Deploy a Claude agent with tool use and conversation memory
The Claude Agent SDK gives you tool use, conversation memory, and streaming out of the box. Combined with Superserve’s durable workspace, the agent retains full context across turns - files it creates persist, and conversation history survives sandbox restarts.
Copy
import asynciofrom claude_agent_sdk import ClaudeAgentOptions, ClaudeSDKClient, TextBlockoptions = ClaudeAgentOptions( model="sonnet", system_prompt="You are a helpful assistant.", permission_mode="bypassPermissions", continue_conversation=True,)async def main(): async with ClaudeSDKClient(options=options) as client: while True: try: user_input = input() except EOFError: break await client.query(prompt=user_input) async for msg in client.receive_response(): for block in getattr(msg, "content", []): if isinstance(block, TextBlock): print(block.text)asyncio.run(main())
Copy
claude-agent-sdk
Copy
superserve deploy agent.py # or agent.tssuperserve secrets set my-agent ANTHROPIC_API_KEY=sk-ant-...superserve run my-agent
The continue_conversation option enables conversation memory across turns. Combined with Superserve’s workspace persistence, the agent has full context even after the sandbox restarts.