Build agents in Python or TypeScript on Claude Code's agent loop and tools
commercial software
The Claude Agent SDK (formerly the Claude Code SDK) is Anthropic's library for building AI agents with the same tools, agent loop and context management that power Claude Code, from Python or TypeScript in a process you operate. It runs the Claude Code binary and exposes its built-in tools for reading, writing and editing files, running commands and searching the web, along with hooks, subagents, MCP servers, permissions, resumable and forkable sessions, skills, commands, memory and plugins. Agents authenticate with an API key for the Claude API; without Anthropic's approval, products built on it can't offer claude.ai login or its rate limits. Its use is governed by Anthropic's Commercial Terms of Service.
Problems it solves
- embed a coding agent that can edit files and run commands inside my own Python app
- build a Claude-powered agent without writing the tool loop myself
- run Claude Code programmatically from TypeScript with my own tools and permissions
Features
- Claude Code's built-in file, shell and web search tools
- agent loop and context management
- hooks
- subagents
- MCP servers
- permissions
- resumable and forkable sessions
- skills, commands, memory and plugins
- OpenTelemetry observability
- cost and usage tracking
Capabilities
| Takes plugins | plan not known |
|---|---|
| Has official SDKs | plan not known |
Alternatives
The same job
These do what Claude Agent SDK does.
- Pydantic AI How Python does AI: agents, realtime voice, image generation, embeddings, typed end to end
- DeepSeek Harness DeepSeek Harness: Everything is a Plugin.
