E2B
SDK / ToolOpen-source secure sandboxes where AI agents run code — the de facto execution layer for agent apps.
- sandbox
- code-execution
- sdk
- agents
Python edition of the official Claude Agent SDK.
Python edition of the official Claude Agent SDK. Embeds the Claude Code agent loop (tools, context management, hooks) in Python programs so you can build production agents without reimplementing the runtime.
Best for Python production agents — CI pipelines, triage bots, research assistants, multi-agent research with asyncio.gather(*queries, return_exceptions=True). Pairs with FastAPI for serving, any Python queue for background dispatch, and existing logging stacks for audit. The Python companion to the TypeScript SDK.
pip install claude-agent-sdk # or uv add claude-agent-sdk Requires Python 3.10+, the Claude Code CLI on PATH, and ANTHROPIC_API_KEY set. The SDK runs the CLI under the hood.
Pin to a major version — the SDK's Pydantic models evolve between minor releases. Always set max_turns and max_budget_usd in production. For multi-agent fan-out, prefer asyncio.gather(*queries, return_exceptions=True) — using asyncio.as_completed directly on async generators will raise TypeError.
Repository
anthropics/claude-agent-sdk-pythonCharted
Open-source secure sandboxes where AI agents run code — the de facto execution layer for agent apps.
Pythonic framework for building MCP servers — decorators, type hints, and zero boilerplate.
Anthropic's official TypeScript SDK for building agentic applications.