Skip to content
ReviewRamble

The weekly brief

AI, reviewed, in your inbox.

  • New reviews of tools, models, MCP servers and repos, with the verdict up front
  • Re-checked prices and ratings when something changes
  • New analysis pieces as they are published

Models, agents, MCP servers and the tools actually worth your time.

One email a week. Unsubscribe with the link in any brief. How we use your email

Claude Agent SDK

Anthropic's Python and TypeScript library that runs the Claude Code agent inside your own program, with its tools, hooks and permissions.

Reviewed by Sheela · Updated

View on GitHub Open source

Our rating

4.2/5

No faster route to an agent that already edits files and runs commands, provided you accept Claude Code as a closed engine inside it.

What is Claude Agent SDK?

The Claude Agent SDK lets a Python or TypeScript program run the same agent loop, tools and context management that power Claude Code. It was previously called the Claude Code SDK. The library starts a bundled Claude Code binary and exchanges messages with it, so an agent built on it can read, write and edit files, run shell commands and search the web out of the box.

query() runs a one-shot task as an async stream; ClaudeSDKClient holds a two-way session and adds custom tools, written as plain Python functions and served as in-process MCP servers, plus hooks that run your code at points in the agent's lifecycle. Subagents, sessions that resume or fork, permission modes, skills, plugins and project memory from .claude/ folders all carry over from Claude Code.

The Python package needs Python 3.10 or later. Version 0.2.178 shipped on 4 November 2026 with Claude Code 2.1.318 bundled; the TypeScript package is published as @anthropic-ai/claude-agent-sdk.

Is Claude Agent SDK worth it?

The Agent SDK's value is that the hard parts are already written. File editing, shell access, context compaction, subagents and permission prompts come from Claude Code, which Anthropic updates every few days, so a ten-line query() call gets an agent that can fix a bug in a real repository. Rival frameworks such as the OpenAI Agents SDK or LangGraph give you primitives to assemble; this gives you a finished harness to constrain.

That inversion shapes the security model. By default Claude has the full Claude Code toolset, including Bash and Write. allowed_tools only auto-approves the tools you list; it does not remove the rest, which fall through to the permission mode and your can_use_tool callback. Removing a tool needs disallowed_tools. Anyone embedding the SDK in a service should read the permissions guide before the quickstart, and run the process in a container if the inputs are untrusted.

The open-source label needs a footnote. The Python wrapper is MIT-licensed, but the work happens in the bundled Claude Code binary, and the docs state that use of the SDK is governed by Anthropic's Commercial Terms. The TypeScript repository is marked all rights reserved. You cannot fork the agent loop, only configure it.

Release cadence follows Claude Code: 25 Python releases between 15 September and 4 November 2026, from 0.2.153 to 0.2.178, still below 1.0. The repo has about 8,440 stars and 616 open issues and pull requests. The docs bar third-party products from offering claude.ai login or plan rate limits without approval, so a product built on the SDK bills through API keys; on a developer's own machine, signed-in use draws on their Claude plan. A monthly SDK credit announced for 15 June 2026 was paused on the day.

Where it earns its place

  • A platform engineer at a 100-developer company

    Run an internal bot that triages failing CI jobs and proposes patches

    Call query() from the CI runner with cwd set to the checkout, disallowed_tools for anything outside the repo and a PreToolUse hook that blocks network commands; usage bills to a Console API key with its own spend limit.

  • A start-up adding an agent to a document-management product

    Let customers ask an agent to reorganise and summarise their files

    Expose the product's own actions as custom tools with the @tool decorator and create_sdk_mcp_server, so they run in-process; each customer session runs in its own container, and billing goes through API keys because claude.ai login is not allowed.

  • A solo developer automating chores on their own laptop

    Script repeat refactors without writing an agent loop

    A short Python script with ClaudeSDKClient and acceptEdits mode handles the edits; signed in with a personal Claude plan it draws on that plan's limits rather than a separate bill.

Before you commit

Setup
pip install claude-agent-sdk on Python 3.10+ (or npm install @anthropic-ai/claude-agent-sdk), set an API key, and the quickstart's bug-fixing agent runs in minutes; no separate Claude Code install is needed.
Integrations
MCP servers, in-process custom tools, hooks, subagents, skills and plugins from .claude/ folders; Claude API, Amazon Bedrock, Google Cloud and Microsoft Foundry for model access.
Data and privacy
Runs locally with the permissions of its process and sends prompts and file contents to Claude under the account's API or plan terms; the default toolset can read, write and execute anywhere the process can.
Cost at scale
The SDK is free; cost is Claude tokens at API rates, and agent loops with many tool calls multiply tokens per task. Max, Ultra and Team plans include monthly API credits usable with a linked Console key.
Limits
Claude models only; pre-1.0 API with frequent releases; branding rules forbid calling a product Claude Code; the agent loop itself cannot be modified.

What’s good

  • Claude Code's file, shell and web tools out of the box
  • Custom tools as in-process MCP servers, no separate process
  • Hooks, subagents, sessions and plugins carried over
  • Same engine on the API, Bedrock, Google Cloud and Foundry
  • Frequent releases tracking Claude Code

What’s not

  • Core binary is closed and under Anthropic's Commercial Terms
  • All tools available by default; allowed_tools does not restrict
  • Claude models only
  • Pre-1.0 with releases every few days
  • Products cannot offer claude.ai login to their users

Best for

Developers who want a Claude Code-grade coding or file-working agent inside their own product and are standardised on Claude.

Claude Agent SDK alternatives

Claude Agent SDK: common questions

Is Claude Agent SDK worth it?
No faster route to an agent that already edits files and runs commands, provided you accept Claude Code as a closed engine inside it. We rate it 4.2 out of 5.
How much does Claude Agent SDK cost?
Python wrapper free under the MIT licence; the bundled Claude Code binary and the TypeScript package are under Anthropic's Commercial Terms. You pay for Claude API usage, or draw on your own Claude plan's limits.
What are the downsides of Claude Agent SDK?
Core binary is closed and under Anthropic's Commercial Terms; all tools available by default; allowed_tools does not restrict; claude models only; pre-1.0 with releases every few days; products cannot offer claude.ai login to their users.
Who is Claude Agent SDK best for?
Developers who want a Claude Code-grade coding or file-working agent inside their own product and are standardised on Claude.
How much does Claude Agent SDK cost for a team or in production?
The SDK is free; cost is Claude tokens at API rates, and agent loops with many tool calls multiply tokens per task. Max, Ultra and Team plans include monthly API credits usable with a linked Console key.
Is Claude Agent SDK safe for company data?
Runs locally with the permissions of its process and sends prompts and file contents to Claude under the account's API or plan terms; the default toolset can read, write and execute anywhere the process can.
What are the best Claude Agent SDK alternatives?
The closest alternatives we have reviewed are OpenAI Agents SDK, Pydantic AI, LangGraph and Google Agent Development Kit (ADK).

Answers checked Nov 6, 2026.

Make Claude Agent SDK? Show this rating on your siteClaude Agent SDK rated 4.2 out of 5 on ReviewRamble