From anthropic-docs
Builds autonomous AI agents using the Claude Agent SDK (TypeScript and Python). Covers hooks, MCP servers, sandbox, session management, and structured outputs.
How this skill is triggered — by the user, by Claude, or both
Slash command
/anthropic-docs:claude-agent-sdkThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
| | TypeScript | Python |
CHANGELOG.mdREADME.mdSKILL-known-issues.mdSKILL-python.mdSKILL-typescript.mdconfig.jsondocs-snapshot/MANIFEST.jsonreports/2026-05-19.mdreports/2026-05-20.mdreports/2026-05-21.mdreports/2026-05-22.mdreports/2026-05-23.mdreports/2026-05-24.mdreports/2026-05-25.mdreports/2026-05-26.mdreports/2026-05-28.mdreports/2026-05-30.mdreports/2026-05-31.mdreports/2026-06-01.mdrules/claude-agent-sdk-py.md| TypeScript | Python | |
|---|---|---|
| Version | v0.3.159 | v0.2.87 |
| Package | @anthropic-ai/claude-agent-sdk | claude-agent-sdk (PyPI) |
| Docs | TypeScript SDK | Python SDK |
| Repo | claude-agent-sdk-typescript | claude-agent-sdk-python |
| Full reference | SKILL-typescript.md | SKILL-python.md |
.ts files, TypeScript imports, or npm/node → read SKILL-typescript.md.py files, Python imports, or pip/python → read SKILL-python.md| Concept | TypeScript | Python |
|---|---|---|
| One-shot query | query(options) | query(options) |
| Stateful client | N/A (query manages state) | ClaudeSDKClient |
| Options type | Options interface | ClaudeAgentOptions dataclass |
| Tool definition | tool(name, schema, handler) | @tool(name, desc, schema) decorator |
| MCP server factory | createSdkMcpServer() | create_sdk_mcp_server() |
| Permission callback | canUseTool | can_use_tool |
| Permission mode | permissionMode: "..." | permission_mode="..." |
| Hook registration | hooks: { PreToolUse: [...] } | hooks={"PreToolUse": [...]} |
| System prompt | systemPrompt | system_prompt |
| Max turns | maxTurns | max_turns |
| Allowed tools | allowedTools | allowed_tools |
| MCP servers | mcpServers | mcp_servers |
| Subagent def | AgentDefinition | AgentDefinition dataclass |
Both SDKs wrap the Claude Code CLI and share these concepts:
SessionStore)For API details, code examples, options tables, and known issues, read the language-specific reference file.
npx claudepluginhub xiaolai/claude-plugin-marketplace --plugin anthropic-docsBuilds and troubleshoots Claude Agent SDK apps in Python and TypeScript, covering APIs, sessions, permissions, streaming, tools, plugins, and extensibility.
Guides Claude Agent SDK development in TypeScript/Python: auth, sessions, custom tools, permissions, prompts, tracking via docs-management delegation.
Builds AI agents and automates Claude Code using Agent SDK and headless CLI mode. Covers Python SDK, MCP servers, hooks, sessions, and programmatic queries.