Claude Agent SDK
This SDK exposes the same building blocks used internally to build Claude Code: tool management, the agentic loop, context caching. It lets you build a custom agent rather than using Claude Code as-is.

Key advantages
- Officially maintained by Anthropic
- Exposes the same building blocks Claude Code uses internally
- Allows fine-grained control over the agent's behavior
Who it's for, and why
Developers who want to build their own custom agent rather than use a finished product.
- Building a custom agent for a specific business need
- Integrating Claude into an existing application with agentic logic
- Rapidly prototyping a new agent before productionizing it
Getting started
- 1Install: `pip install claude-agent-sdk` (Python 3.10 or later).
- 2The Claude Code CLI is bundled automatically with the package: no separate install needed to get started.
- 3To use an existing Claude Code install instead of the bundled one, pass `cli_path` in `ClaudeAgentOptions`.
Things to watch out for
- A low-level SDK aimed at developers building their own agent: more integration work than using Claude Code directly for someone who just wants a ready-to-use agent.
- Billed by usage of the underlying model (Anthropic API), to be budgeted separately from development cost.
Frequently asked questions
Do I need to install Claude Code separately to use this SDK?
No, the Claude Code CLI is bundled automatically with the Python package. A separate system install remains possible if a specific path or version is needed.
How is it different from Claude Code itself?
Claude Code is a finished, ready-to-use product; this SDK exposes the same internal building blocks (agentic loop, tool management) to build a fully custom agent, integrated into your own application.
Is it Python-only?
This repository is the Python version; an equivalent SDK also exists in TypeScript for Node.js projects.
Similar tools
Worth exploring too
Claude Code
Anthropic's command-line agent, able to read, write and execute code directly inside a real project.
Vercel MCP
Vercel's MCP server: check deployments, logs and projects directly from an AI agent.
Playwright
Microsoft's browser testing and automation framework, used here to capture real screenshots.