An agent is an application that completes a task by planning its own steps and calling tools that read files, run commands, or edit code. The Agent SDK gives you the same tools, agent loop, and context management that power Claude Code, programmable in Python and TypeScript.
Compare the Agent SDK to other Claude tools
The Agent SDK, the CLI, the Client SDK, and Managed Agents each fit different needs. Use the table to find the one that matches what you’re building.
| If you’re… | Use | Why |
|---|---|---|
| Building an agent without implementing the tool loop yourself | Agent SDK | A library that runs the agent loop in your own process, in Python or TypeScript. |
| Doing interactive development or running one-off tasks from a terminal | Claude Code CLI | The terminal interface, built for daily interactive use. |
| Calling the API directly and implementing the tool loop yourself | Client SDK | Direct access to the Anthropic API rather than to Claude Code. You implement the tool loop yourself. |
| Running long-running or asynchronous agents without managing your own sandbox or session infrastructure | Managed Agents | Hosted REST API, a separate product from the Agent SDK. Anthropic runs the agent and the sandbox. |
The SDK is available as a library for Python and TypeScript only. To drive the same agent loop from another language, run the CLI as a subprocess with the -p flag and --output-format json.
Capabilities
Everything that makes Claude Code powerful is available in the SDK.
| Capability | What it does | Learn more |
|---|---|---|
| Built-in tools | Read, write, edit files, run commands, and search the web | Tools reference |
| Hooks | Run custom code at key points in the agent lifecycle | Hooks |
| Subagents | Spawn specialized agents for focused subtasks | Subagents |
| MCP | Connect external tools and data sources via the Model Context Protocol | MCP |
| Permissions | Control which tools run automatically, which need approval | Permissions |
| Sessions | Maintain context across exchanges, resume or fork later | Sessions |
| Skills, commands, and memory | Load automatically from your project’s .claude/ and from ~/.claude/, same as Claude Code | Skills, Commands, Memory, Configuration loading |
| Plugins | Package skills, agents, hooks, and MCP servers, and load them by local path | Plugins |
Get started
Follow the Quickstart to install the SDK, set your API key, and build your first agent, one that finds and fixes bugs in existing code.
Changelog
View the full changelog for SDK updates, bug fixes, and new features:
- TypeScript SDK: view CHANGELOG.md
- Python SDK: view CHANGELOG.md
Report bugs
If you encounter bugs or issues with the Agent SDK:
- TypeScript SDK: report issues on GitHub
- Python SDK: report issues on GitHub
Branding guidelines
For partners integrating the Claude Agent SDK, use of Claude branding is optional. When referencing Claude in your product: Allowed:
- “Claude Agent”, preferred for dropdown menus
- “Claude”, when within a menu already labeled “Agents”
- “{YourAgentName} Powered by Claude”, if you have an existing agent name
Not permitted:
- “Claude Code” or “Claude Code Agent”
- Claude Code-branded ASCII art or visual elements that mimic Claude Code
Your product should maintain its own branding and not appear to be Claude Code or any Anthropic product. For questions about branding compliance, contact the Anthropic sales team.
License and terms
Use of the Claude Agent SDK is governed by Anthropic’s Commercial Terms of Service, including when you use it to power products and services that you make available to your own customers and end users, except to the extent a specific component or dependency is covered by a different license as indicated in that component’s LICENSE file.
Next steps
These resources cover deeper technical detail and example projects for building with the Agent SDK.
- Quickstart: build your first agent that finds and fixes bugs
- Agent loop: how Claude plans, calls tools, and decides when a task is done
- Example agents: demo apps for local development
- TypeScript SDK: full TypeScript API reference and examples
- Python SDK: full Python API reference and examples
- Agent harness design: how the Claude Code team uses dynamic workflows to orchestrate subagents at scale