# 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.

Devtoolwatch Board, the week of Oct 25–31, 2026. Canonical page: https://index.devtoolwatch.com/tools/claude-agent-sdk/

## 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.

## Claude Agent SDK at a glance

- **Category:** [Agent frameworks](https://index.devtoolwatch.com/categories/agent-frameworks/)
- **Maintained by:** Anthropic (organization, [@anthropics](https://github.com/anthropics) on GitHub)
- **License:** MIT
- **Language:** Python, Shell
- **Repository:** [github.com/anthropics/claude-agent-sdk-python](https://github.com/anthropics/claude-agent-sdk-python)
- **npm package:** [@anthropic-ai/claude-agent-sdk](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk) 0.3.307
- **PyPI package:** [claude-agent-sdk](https://pypi.org/project/claude-agent-sdk/) 0.2.171
- **Latest release:** [v0.2.171](https://github.com/anthropics/claude-agent-sdk-python/releases/tag/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 Claude Agent SDK

**With pip**

```
pip install claude-agent-sdk
```

**Optional: install Claude Code CLI separately**

```
curl -fsSL https://claude.ai/install.sh | bash
```

### Requirements

- 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

1. Install the package with pip on Python 3.10 or later.
2. Import query from claude_agent_sdk and iterate over its messages inside an async function run with anyio.
3. Set ClaudeAgentOptions such as allowed_tools, permission_mode, and cwd to control tools and the project directory.
4. 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

- 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.

## Usage data (the week of Oct 25–31, 2026)

- Board rank: #137 overall, #14 in Agent frameworks, momentum score 56
- Downloads that week: 25.6M (+15% vs 4-week average)
- New GitHub stars per week (last 12 weeks): Aug 9: 64; Aug 16: 60; Aug 23: 56; Aug 30: 43; Sep 6: 52; Sep 13: 47; Sep 20: 39; Sep 27: 42; Oct 4: 42; Oct 11: 55; Oct 18: 53; Oct 25: 54

## Claude Agent SDK alternatives

| Rank | Tool | Stars | Downloads/wk |
|---|---|---|---|
| #1 | [Harness²](https://index.devtoolwatch.com/tools/google-research-harness2/) | 21.7k | – |
| #2 | [HyperFrames](https://index.devtoolwatch.com/tools/heygen-com-hyperframes/) | 76.6k | 1.5M |
| #3 | [AgentScope](https://index.devtoolwatch.com/tools/agentscope-ai-agentscope/) | 35k | 51.4k |
| #4 | [AG-UI](https://index.devtoolwatch.com/tools/ag-ui/) | 16.9k | 4.6M |
| #5 | [LangGraph](https://index.devtoolwatch.com/tools/langgraph/) | 44.2k | 18.5M |
| #6 | [Bifrost](https://index.devtoolwatch.com/tools/maximhq-bifrost/) | 9.3k | – |

## 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](https://index.devtoolwatch.com/tools/claude-code/)

### 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](https://index.devtoolwatch.com/tools/langgraph/)

### 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

1. [anthropics/claude-agent-sdk-python on GitHub](https://github.com/anthropics/claude-agent-sdk-python)
2. [Claude Agent SDK README](https://github.com/anthropics/claude-agent-sdk-python/blob/main/README.md)
3. [@anthropic-ai/claude-agent-sdk on npm](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk)
4. [claude-agent-sdk on PyPI](https://pypi.org/project/claude-agent-sdk/)
5. [Release v0.2.171 (Oct 21, 2026)](https://github.com/anthropics/claude-agent-sdk-python/releases/tag/v0.2.171)
6. [Release v0.2.170 (Oct 21, 2026)](https://github.com/anthropics/claude-agent-sdk-python/releases/tag/v0.2.170)
7. [Release v0.2.169 (Oct 20, 2026)](https://github.com/anthropics/claude-agent-sdk-python/releases/tag/v0.2.169)
8. [Hacker News: Claude Agent SDK for Python](https://news.ycombinator.com/item?id=45429623)
9. [Devtoolwatch Board, the week of Oct 25–31, 2026](https://index.devtoolwatch.com/)
