Agent SDK
The SDK for building custom agents on Claude Code's engine — the same tools, permissions, skills and hooks, with your own orchestration around them.
Last verified August 21, 2026 · 4 sources
The Agent SDK is Claude Code with the interactive shell removed and a programming interface in its place. You get the same agent loop, the same tools, the same permission model and the same extensibility — and you decide what the agent does.
Available for TypeScript and Python.
What you get that a raw API loop would not give you
Building an agent directly on the Messages API means writing the loop, the tool dispatch, the retry logic, the permission prompts, the session persistence and the cost tracking yourself. The SDK ships those:
- The agent loop, streaming input and output
- Custom tools, plus MCP and tool search for scaling past a handful of tools
- Skills, plugins, subagents and hooks
- Permission handling and approval flows
- Sessions, including persisting them to external storage
- File checkpointing, so changes can be rewound
- Structured outputs, todo tracking, cost tracking and OpenTelemetry observability
What it does not do
- It is not a hosted service. You host it. Anthropic documents hosting and secure deployment separately, and the secure-deployment page is the one to read before shipping.
- It is not the Messages API. It sits on top. If all you need is one completion, you do not need an agent SDK.
- It is not stable across major versions by default. The TypeScript V2 session API is documented as removed — worth checking the migration guide before upgrading anything old.
Migration
There is a dedicated “Migrate to Claude Agent SDK” guide, which is the trail left by the rename from the earlier Claude Code SDK. If you have code referencing the old package name, start there.
Plan availability
Anything left blank is not documented publicly, not a claim that it is unavailable. Compare every feature at once in the availability matrix.
- FreeNot available
- ProIncluded
- MaxIncluded
- TeamIncluded
- EnterpriseIncluded
- APIIncluded
Sources
- 01Agent SDK overviewOfficialcode.claude.com
- 02Agent SDK reference — TypeScriptOfficialcode.claude.com
- 03Agent SDK reference — PythonOfficialcode.claude.com
- 04Securely deploying AI agentsOfficialcode.claude.com
Page changelog
- VerifiedFeature inventory checked against the Agent SDK documentation index.