Framework · Anthropic
Claude Agent SDK at a glance
Anthropic's SDK puts the harness behind Claude Code, with file and shell tools, permissions, hooks, subagents and skills, inside your own Python or TypeScript program. Unlike the rest of this list it runs Claude models only, and Anthropic's Commercial Terms govern its use.
Best for: Apps where Claude should do real work on a filesystem, under tool permissions you control.
Key facts
- Maintainer
- Anthropic
- Languages
- Python, TypeScript
- Licence
- Anthropic Commercial Terms
- Latest version
Python 0.2.163 / TypeScript 0.3.286· September 30, 2026- Repository
- anthropics/claude-agent-sdk-python
- Hosted option
- Claude Managed Agents
Quickstart
Install the package, set the credentials, then run the smallest agent from the official docs. Model IDs are the ones the docs use and may not be enabled on your account.
Python
pip install claude-agent-sdkimport asyncio
from claude_agent_sdk import query, ClaudeAgentOptions
async def main():
async for message in query(
prompt="Find and fix the bug in auth.py",
options=ClaudeAgentOptions(allowed_tools=["Read", "Edit", "Bash"]),
):
print(message) # Claude reads the file, finds the bug, edits it
asyncio.run(main())TypeScript
npm install @anthropic-ai/claude-agent-sdkimport { query } from "@anthropic-ai/claude-agent-sdk";
for await (const message of query({
prompt: "Find and fix the bug in auth.ts",
options: { allowedTools: ["Read", "Edit", "Bash"] }
})) {
console.log(message); // Claude reads the file, finds the bug, edits it
}Features
| Any model | No | Claude only, via Anthropic, Bedrock, Google Cloud or Foundry |
|---|---|---|
| MCP client | Yes | mcpServers option; plugins can bundle MCP servers |
| MCP server | Not confirmed | |
| Multi-agent | Yes | Subagents handle focused subtasks |
| Durable runs | Not confirmed | Sessions can be resumed or forked; no durable engine |
| Human approval | Yes | Permission modes decide which tools need approval |
| Tracing | Yes | OpenTelemetry export; traces are in beta |
| Evals | No |
Recent changes
- Renamed from Claude Code SDK; a migration guide is available.
- Both SDKs now bundle a native Claude Code binary.
- Since 15 June 2026, SDK use on subscription plans draws from a separate monthly Agent SDK credit.
- Third-party apps may not offer claude.ai login without Anthropic's approval.