Devtoolwatch BoardGet it every Monday

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.

Updated Nov 1, 2026. Review written Oct 22, 2026 from the project's own sources; usage data refreshed every Monday.

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

New GitHub stars per week for Claude Agent SDK12 weeks from Aug 9, 2026: 64, 60, 56, 43, 52, 47, 39, 42, 42, 55, 53, 54 new stars, an average of 51 a week.Aug 9week of Oct 25
New GitHub stars per week for the last 12 weeks, from GitHub's stargazer history (today's stargazers by the week they starred).
Show the weekly numbers
New GitHub stars per week for Claude Agent SDK
Week ofNew stars
Aug 9, 202664
Aug 16, 202660
Aug 23, 202656
Aug 30, 202643
Sep 6, 202652
Sep 13, 202647
Sep 20, 202639
Sep 27, 202642
Oct 4, 202642
Oct 11, 202655
Oct 18, 202653
Oct 25, 202654

On Hacker News

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:

Agent frameworks ranked by momentum, the week of Oct 25–31, 2026
RankToolStarsDownloads/wk
#1Harness²Harness² is a Python framework from Google Research for recursive agent harnessing, refining an agent's prompts, tools, memory and…21.7k–
#2HyperFramesHyperFrames is an open-source framework that turns HTML, CSS, media, and seekable animations into deterministic MP4 videos, built for AI…76.6k1.5M
#3AgentScopeAgentScope is a Python agent framework with an SDK for building ReAct agents and an agent service backend with a web UI.35k51.4k
#4AG-UIAG-UI is an open, event-based protocol that standardizes how AI agents connect to user-facing frontend applications.16.9k4.6M
#5LangGraphLangGraph is a low-level orchestration framework and runtime for building, managing, and deploying long-running, stateful agents in…44.2k18.5M
#6BifrostOpen-source, high-performance AI gateway that works as your LLM gateway, MCP gateway and agent gateway. One OpenAI-compatible API for…9.3k–

All AI agent frameworks, ranked

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

  1. anthropics/claude-agent-sdk-python on GitHub
  2. Claude Agent SDK README
  3. @anthropic-ai/claude-agent-sdk on npm
  4. claude-agent-sdk on PyPI
  5. Release v0.2.171 (Oct 21, 2026)
  6. Release v0.2.170 (Oct 21, 2026)
  7. Release v0.2.169 (Oct 20, 2026)
  8. Hacker News: Claude Agent SDK for Python
  9. 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:

Devtoolwatch badge for Claude Agent SDK

[![Devtoolwatch](https://index.devtoolwatch.com/badge/claude-agent-sdk.svg)](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].