Updated

Claude Agent SDK

Anthropic's SDK for building agents on the same harness as Claude Code — tool use, file and shell access, subagents and context management — in Python and TypeScript.

83 open-source projects declare Claude Agent SDK in their code; no maker's live product we track uses it yet. What makers like most: Exposes nearly everything Claude Code has, including subagents, plan mode, background tasks, plugins, shell and MCP tools, as a library. Their most common complaint: Rules on using it with a Claude subscription are confusing and keep changing, including an announced billing change that was later paused.

Open sourceSelf-hostableNo free tierPaid from Pay per token

Profile checked

Works with AI agents:llms.txt
Ask your AI about this, with this page as the source:ChatGPT ↗Claude ↗Perplexity ↗

How makers use Claude Agent SDK

What Claude Agent SDK is used for

AI SDK & Agent Framework · Agent harness →Agents that read and edit files, run shell commands and manage long context, built on the same harness as Claude Code.Trade-off: Built for Claude models, and it needs a filesystem and process to run in, which serverless functions don't give you.
LangChain66Mastra24LlamaIndex16AI SDK5CrewAI3Claude Agent SDK0Makers' products on each, for AI SDK & agent framework

Claude Agent SDK vs the alternatives makers chose

OptionMakers' productsOpen source
LangChain66 57%Yes
Mastra24 21%Yes
LlamaIndex16 14%Yes
AI SDK5 4%Yes
CrewAI3 3%Yes
LangGraph1 1%Yes
Claude Agent SDK0 0%Yes

For AI SDK & agent framework: how many of the 115 makers' products we know the AI SDK & agent framework of chose each option.

When to use Claude Agent SDK, and when not

Pick Claude Agent SDK if

Something else fits better if

  • Your app is TypeScript and you want agents without adding a Python service: AI SDK or Mastra.
  • You want a small typed agent loop in Python, close to the raw API: Pydantic AI or OpenAI Agents SDK.
  • You need many prebuilt connectors for models, tools and data sources: LangChain.
  • Your agent is a long-running workflow with branches, saved state and human approval steps: LangGraph.
  • The agent mostly retrieves and reasons over your own documents: LlamaIndex.
From each decision's guide, written from what makers' products chose and why.

The Claude Agent SDK is a library that puts the agent behind Claude Code inside your own program. Instead of writing the tool-calling loop yourself, you call one function and get an agent that reads and edits files, runs shell commands, searches the web and decides when it is done.

More about Claude Agent SDK

The model to understand: when your code calls query(), the SDK starts a claude CLI process and talks to it over stdio. That process owns a shell, a working directory and session transcripts on local disk, so each running session is a long-lived process with local state, not a stateless API call. The SDK ships for Python and TypeScript; other languages can run the CLI as a subprocess with JSON output.

What a small team gets: built-in file, shell and web tools; your own functions exposed as tools through an in-process MCP server, plus external MCP servers; permission rules for which tools run without approval; hooks at points in the agent lifecycle; subagents; and sessions you can resume or fork. It calls the Claude API with an API key, or Claude through Amazon Bedrock, Google Cloud or Microsoft Foundry. You host it yourself, usually in sandboxed containers.

The main limit is operational. Anthropic suggests about 1 GiB of RAM, 5 GiB of disk and one CPU per agent as a starting point, and transcripts and working files disappear with the container unless you persist them. For a few tool calls per request, the plain Claude client SDK is lighter.

How Claude Agent SDK itself is built

3 tools, from its own code, website and Product Hunt page.

Claude Agent SDK pros and cons

What makers like most: Exposes nearly everything Claude Code has, including subagents, plan mode, background tasks, plugins, shell and MCP tools, as a library. Their most common complaint: Rules on using it with a Claude subscription are confusing and keep changing, including an announced billing change that was later paused.

Pros

  • Exposes nearly everything Claude Code has, including subagents, plan mode, background tasks, plugins, shell and MCP tools, as a library. HNHN 2HN 3HN 4
  • A headless Claude Code makes custom desktop and mobile front ends far easier to maintain than scraping terminal output. HNHN 2HN 3
  • Teams stand up internal agents quickly, such as Slack helpers, grading tools and agent factories. HNHN 2HN 3HN 4
  • Hooks and permission controls are unusually granular for an agent SDK. HN

Cons and watch-outs

  • Rules on using it with a Claude subscription are confusing and keep changing, including an announced billing change that was later paused. HNHN 2HN 3HN 4
  • It feels heavy and hard to customize, essentially a thin, closed wrapper around the CLI with incomplete docs. HNHN 2
  • Automations, scheduling and security boundaries need separate infrastructure you build yourself. HN
  • It ties you to Claude models, so some developers build vendor-agnostic replacements. HNHN 2

Themes that recur in makers' words and Hacker News comments, each linked to what it summarises.

Reliability and open issues

The most wanted open issue on GitHub has 36 👍.

Most wanted on GitHub

Open on 2026-10-04 in anthropics/claude-agent-sdk-python, with activity in the last year — issues and feature requests by 👍.

Who uses it

No maker's live product on record yet, and 83 open-source projects that declare it in their code.

We haven't found a maker's live product that uses Claude Agent SDK yet — only the open-source projects below, which declare it in their code.

Agno
AgnoOpen-source Python agent framework and runtime (AgentOS) that you run in your own cloud,…AI SDK & Agent FrameworkIn its code · source ↗
Aix-DB
Aix-DBAix-DB 基于 LangChain/LangGraph 框架,结合 MCP Skills 多智能体协作架构,实现自然语言到数据洞察的端到端转换。AI SDK & Agent FrameworkIn its code · source ↗
Novu
NovuNotification infrastructure for sending multi-channel messages (email, in-app, SMS, chat…AI SDK & Agent FrameworkIn its code · source ↗
ArcReel
ArcReelAI Agent 驱动的开源可自部署视频工作台:将小说与剧本转为角色、场景、道具资产、分镜、视频和剪映草稿,支持跨镜头一致性、多供应商与费用追踪 | Self-hosted A…AI SDK & Agent FrameworkIn its code · source ↗
Happy
HappyAn open-source (MIT) desktop, mobile and terminal app that runs Claude Code, Codex and G…AI SDK & Agent FrameworkIn its code · source ↗

Open source: a project that declares Claude Agent SDK as a dependency in its public code — verifiable, but not necessarily a live product.

What its projects tell coding agents

55 of the 62 open-source products built with Claude Agent SDK that were worked on in the last 180 days keep instruction files for coding agents — 89%, against 53% of all the projects we read. AGENTS.md is in 45, CLAUDE.md in 40.

1,210words in the median file
npmthe package manager most named, in 12 of 51 files
57%say how to test a change
Named more in these files than in other projects' — in how many of the 51:
What AGENTS.md files say about other tools →What open-source products tell their coding agents →

Alternatives to Claude Agent SDK

All alternatives by situation →

Further reading

Questions makers ask about Claude Agent SDK

What are the pros and cons of Claude Agent SDK?

Pros makers name: Exposes nearly everything Claude Code has, including subagents, plan mode, background tasks, plugins, shell and MCP tools, as a library. A headless Claude Code makes custom desktop and mobile front ends far easier to maintain than scraping terminal output. Teams stand up internal agents quickly, such as Slack helpers, grading tools and agent factories. Cons: Rules on using it with a Claude subscription are confusing and keep changing, including an announced billing change that was later paused. It feels heavy and hard to customize, essentially a thin, closed wrapper around the CLI with incomplete docs. Automations, scheduling and security boundaries need separate infrastructure you build yourself.

What are the alternatives to Claude Agent SDK?

For AI SDK & agent framework, the other options makers' products we track chose most are LangChain (66), Mastra (24), LlamaIndex (16), AI SDK (5), CrewAI (3), LangGraph (1). Open source or self-hostable among them: LangChain, Mastra, LlamaIndex, AI SDK, CrewAI, LangGraph. Each alternative, with the situation it fits, is on the Claude Agent SDK alternatives page.

When should you use Claude Agent SDK?

Your agent works on files and runs commands, like a coding or research agent (AI SDK & agent framework). Something else fits better if: your app is TypeScript and you want agents without adding a Python service, pick AI SDK or Mastra; you want a small typed agent loop in Python, close to the raw API, pick Pydantic AI or OpenAI Agents SDK.

Can I run it in a serverless function?

It is built for a container rather than a stateless function. Each session is a long-lived claude subprocess with its own shell, working directory and transcripts on local disk, and Anthropic's hosting guide sizes containers at roughly 1 GiB RAM, 5 GiB disk and one CPU per agent. source ↗

Can I use it through Amazon Bedrock or Google Cloud instead of the Anthropic API?

Yes. Set an environment variable for Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry and configure that cloud's credentials; otherwise it uses an Anthropic API key. source ↗

Can my users sign in with their Claude.ai subscription?

No, not without prior approval from Anthropic. Third-party products built on the SDK are expected to authenticate with API keys, not claude.ai login or its rate limits. source ↗

Which languages are supported?

Python (3.10+) and TypeScript (Node.js 18+). Both packages bundle the native Claude Code binary; from other languages you can drive the same loop by running the CLI as a subprocess with JSON output. source ↗

How do I give the agent my own tools?

Define functions with a name, description and input schema, wrap them in the SDK's in-process MCP server, and pass it in the query options. You can also connect external MCP servers and restrict which built-in tools the agent sees. source ↗

Do sessions survive a container restart?

Not by default; transcripts, memory files and working-directory files live on the container's disk. A SessionStore adapter can persist transcripts across hosts, but other files need a mounted volume or your own sync. source ↗

Is it safe to serve several customers from one container?

Only with care. By default the SDK loads settings and memory files from the filesystem, so Anthropic's guide recommends a separate working directory and config directory per tenant and disabling auto memory, or one sandboxed container per agent. source ↗

Is Claude Agent SDK free?

No permanent free tier; paid use starts at Pay per token. source ↗

Is Claude Agent SDK open source or self-hostable?

Open source, and you can self-host it. source ↗

Can AI coding agents work with Claude Agent SDK?

It serves an llms.txt docs index.

Who uses Claude Agent SDK?

No maker's live product we track yet; 83 open-source projects declare it in their code. source ↗