Claude Agent SDK review
Claude Agent SDK is a Python SDK for building agents that interact programmatically with Claude Code, including its tools, custom tools, and hooks.
TL;DR
Claude Agent SDK lets Python developers drive Claude Code from their own code through an async query() function or an interactive client. It fits developers building agents that read, edit, and run code. It bundles the Claude Code CLI, and it supports in-process custom tools as MCP servers plus hooks for deterministic control.
- 8.4kGitHub stars
- +54new stars, week of Oct 25
- ~25.6Mdownloads a week, +15% vs 4-week avg
- #14in Agent frameworks this week
Claude Agent SDK at a glance
- Category
- Agent frameworks
- Maintained by
- Anthropic (organization, @anthropics on GitHub)
- License
- MIT
- Language
- Python, Shell
- Repository
- github.com/anthropics/claude-agent-sdk-python
- npm package
- @anthropic-ai/claude-agent-sdk 0.3.307
- PyPI package
- claude-agent-sdk 0.2.171
- Latest release
- v0.2.171 on GitHub, Oct 21, 2026
- First published
- Jun 11, 2025
What Claude Agent SDK does
- Claude Agent SDK provides query(), an async function that returns an AsyncIterator of response messages from Claude Code.
- Claude Agent SDK gives Claude the full Claude Code toolset by default, including Read, Write, Edit, and Bash.
- Claude Agent SDK includes ClaudeSDKClient for bidirectional, interactive conversations with Claude Code.
- Claude Agent SDK lets you define custom tools as Python functions that run as in-process MCP servers.
- Claude Agent SDK supports hooks, which are Python functions that Claude Code invokes at specific points of the agent loop.
- Claude Agent SDK controls tool permissions with allowed_tools, disallowed_tools, permission_mode, and can_use_tool.
- Claude Agent SDK can combine in-process SDK MCP servers with external subprocess MCP servers.
How it works
You install Claude Agent SDK with pip and call it from async Python code. The SDK uses a Claude Code CLI bundled in the package by default. You can also point it to a system-wide CLI through cli_path. ClaudeAgentOptions sets the system prompt, working directory, tools, permissions, MCP servers, and hooks.
How to install and start using Claude Agent SDK
With pip
pip install claude-agent-sdkOptional: install Claude Code CLI separately
curl -fsSL https://claude.ai/install.sh | bashRequirements
- Python 3.10 or later
- Claude Code CLI, which is bundled with the package by default
- Non-snapshot system prompts require Claude Code CLI 2.1.257 or later
First steps
- Install the package with pip on Python 3.10 or later.
- Import query from claude_agent_sdk and iterate over its messages inside an async function run with anyio.
- Set ClaudeAgentOptions such as allowed_tools, permission_mode, and cwd to control tools and the project directory.
- Use ClaudeSDKClient when you need custom tools, hooks, or interactive conversations.
Who Claude Agent SDK is for
- Python developers building agents that understand codebases, edit files, and run workflows with Claude
- Teams that want custom tools written as Python functions without running separate MCP server processes
- Developers who need deterministic checks on agent actions, such as blocking certain bash commands through hooks
Limitations to know
- Claude Agent SDK works through the Claude Code CLI, so behavior depends on the bundled or installed CLI version.
- Custom tools and hooks require ClaudeSDKClient. The simpler query() function does not support them.
- allowed_tools only auto-approves tools. It does not remove them, so you must use disallowed_tools to block a tool.
- Use of Claude Agent SDK is governed by Anthropic's Commercial Terms of Service.
Is Claude Agent SDK growing? Usage data
In the week of Oct 25–31, 2026, Claude Agent SDK ranked #137 on the Devtoolwatch Board and #14 in Agent frameworks, with a momentum score of 56 out of 100. Its main package had about 25.6M downloads that week, +15% against its own 4-week average.
Show the weekly numbers
| Week of | New stars |
|---|---|
| Aug 9, 2026 | 64 |
| Aug 16, 2026 | 60 |
| Aug 23, 2026 | 56 |
| Aug 30, 2026 | 43 |
| Sep 6, 2026 | 52 |
| Sep 13, 2026 | 47 |
| Sep 20, 2026 | 39 |
| Sep 27, 2026 | 42 |
| Oct 4, 2026 | 42 |
| Oct 11, 2026 | 55 |
| Oct 18, 2026 | 53 |
| Oct 25, 2026 | 54 |
On Hacker News
- Claude Agent SDK for Python, 18 points and 1 comments (Sep 30, 2025)
The Board ranks tools by four signals each week: new stars, new stars for the repo's size, added downloads and download growth beyond the market. How the ranking works.
Claude Agent SDK alternatives
Other AI agent frameworks on the Board in the week of Oct 25–31, 2026, by momentum:
| Rank | Tool | Stars | Downloads/wk |
|---|---|---|---|
| #1 | Harness²Harness² is a Python framework from Google Research for recursive agent harnessing, refining an agent's prompts, tools, memory and… | 21.7k | – |
| #2 | HyperFramesHyperFrames is an open-source framework that turns HTML, CSS, media, and seekable animations into deterministic MP4 videos, built for AI… | 76.6k | 1.5M |
| #3 | AgentScopeAgentScope is a Python agent framework with an SDK for building ReAct agents and an agent service backend with a web UI. | 35k | 51.4k |
| #4 | AG-UIAG-UI is an open, event-based protocol that standardizes how AI agents connect to user-facing frontend applications. | 16.9k | 4.6M |
| #5 | LangGraphLangGraph is a low-level orchestration framework and runtime for building, managing, and deploying long-running, stateful agents in… | 44.2k | 18.5M |
| #6 | BifrostOpen-source, high-performance AI gateway that works as your LLM gateway, MCP gateway and agent gateway. One OpenAI-compatible API for… | 9.3k | – |
Recent Claude Agent SDK releases
Claude Agent SDK FAQ
Is Claude Agent SDK free and open source?
Yes. Claude Agent SDK's source code is on GitHub (anthropics/claude-agent-sdk-python) under the MIT license, so you can use it for free.
How do I install Claude Agent SDK?
Run pip install claude-agent-sdk. It needs Node.js >=18.0.0. The install section above has the other options from the project's README.
Is Claude Agent SDK still maintained?
Yes. The anthropics/claude-agent-sdk-python repository was last updated on Oct 21, 2026, and the latest release, v0.2.171 on GitHub, came out on Oct 21, 2026.
How popular is Claude Agent SDK?
Claude Agent SDK has 8.4k GitHub stars as of Nov 1, 2026. It gained 54 new stars in the week of Oct 25–31, 2026, against a 12-week average of 51 a week. Its main package had about 25.6M downloads that week, +15% against its own 4-week average. That made it #14 among AI agent frameworks on the Devtoolwatch Board.
Claude Agent SDK vs Claude Code: how do they compare?
Claude Agent SDK and Claude Code are both tracked by Devtoolwatch. Claude Agent SDK has 8.4k GitHub stars and Claude Code has 154.1k. In the week of Oct 25–31, 2026, Claude Agent SDK's main package had 25.6M downloads and Claude Code's had 11.6M. Claude Code is Anthropic's agentic coding tool that reads your codebase, edits files, runs commands, and handles git workflows through natural language. Claude Code review.
Claude Agent SDK vs LangGraph: how do they compare?
Claude Agent SDK and LangGraph are both tracked by Devtoolwatch as AI agent frameworks. Claude Agent SDK has 8.4k GitHub stars and LangGraph has 44.2k. In the week of Oct 25–31, 2026, Claude Agent SDK's main package had 25.6M downloads and LangGraph's had 18.5M. LangGraph is a low-level orchestration framework and runtime for building, managing, and deploying long-running, stateful agents in Python or JavaScript. LangGraph review.
What are the best alternatives to Claude Agent SDK?
Other AI agent frameworks on the Devtoolwatch Board in the week of Oct 25–31, 2026, by momentum: Harness² (#1), HyperFrames (#2), AgentScope (#3), AG-UI (#4), LangGraph (#5). The alternatives table above has their numbers.
How does Claude Agent SDK work?
Claude Agent SDK runs the Claude Code CLI from your Python code. That CLI is bundled with the package by default. You send prompts through query() or ClaudeSDKClient and receive typed message objects back. You configure tools, permissions, and hooks with ClaudeAgentOptions.
What is the difference between Claude Agent SDK and Claude Code?
Claude Agent SDK is a programmatic interface to Claude Code. The SDK calls the Claude Code CLI and gives Claude its toolset. Your Python code adds options, custom tools, and hooks on top.
Does Claude Agent SDK support custom tools?
Yes. Claude Agent SDK lets you define a tool with the @tool decorator and serve it with create_sdk_mcp_server. The tool runs as an in-process MCP server inside your Python application.
Is Claude Agent SDK available outside Python?
Yes. Claude Agent SDK also has an npm package, @anthropic-ai/claude-agent-sdk, which requires Node.js 18.0.0 or later.
How do I migrate from the Claude Code SDK?
Claude Code SDK versions below 0.1.0 have breaking changes in Claude Agent SDK. ClaudeCodeOptions is renamed to ClaudeAgentOptions, and system prompt configuration is merged. The CHANGELOG lists the full set of changes.
Sources
- anthropics/claude-agent-sdk-python on GitHub
- Claude Agent SDK README
- @anthropic-ai/claude-agent-sdk on npm
- claude-agent-sdk on PyPI
- Release v0.2.171 (Oct 21, 2026)
- Release v0.2.170 (Oct 21, 2026)
- Release v0.2.169 (Oct 20, 2026)
- Hacker News: Claude Agent SDK for Python
- Devtoolwatch Board, the week of Oct 25–31, 2026
Claude Agent SDK README badge
Maintainers can show the tool's weekly Board rank in their README:
[](https://index.devtoolwatch.com/tools/claude-agent-sdk/)How this page is made: Devtoolwatch writes each review from the project's README, releases, package metadata and website, with an AI model, then checks every claim against the source it cites and drops what the sources don't support. The numbers come from Devtoolwatch's daily GitHub snapshots, GitHub's stargazer history, and the npm and PyPI download APIs. Spotted an error? Email [email protected].