Back to vendors
C

Claude Agent SDK

Also known as: Anthropic Agent SDK, Claude Code SDK, claude-agent-sdk, @anthropic-ai/claude-agent-sdk, Agent SDK by Anthropic

Visit site
Entry priceThe SDK is free; agents bill at Claude API token rates, from Haiku 5.5 at $0.10 input and $0.50 output per million tokens to Opus 5.5 at $4 and $20, with web search at $10 per 1,000 searches.Full pricing detail

Claude Agent SDK is Anthropic's Python and TypeScript library for building production agents on the same agent loop, built in tools, permissions and context management that power Claude Code. Developers embed it in their own applications and host it themselves, adding custom tools and MCP servers, subagents, hooks, sessions that resume across hosts and OpenTelemetry traces, while the agents run on Claude models through the Claude API, Amazon Bedrock, Google Cloud or Microsoft Foundry.

Claude Agent SDK is a free library from Anthropic, the maker of the Claude models, that packages the agent behind Claude Code so developers can build agents of their own. It ships as Python and TypeScript packages, each bundling a native Claude Code binary that the SDK runs as a subprocess, and it replaced the earlier Claude Code SDK packages. Use falls under Anthropic's Commercial Terms of Service, including when the agents power products sold to the developer's own customers.

A single query starts an agent loop in which Claude plans its own steps, calls tools, reads the results and decides when the task is done, while the SDK handles tool execution, context management and retries. Built in tools read, write and edit files, run shell commands, search code and search or fetch the web; custom tools run as in process MCP servers, external MCP servers reach databases, browsers and APIs, and tool search scales to large tool sets. Subagents take focused subtasks in fresh contexts, hooks run custom code before and after tool calls and can block them, and project instructions, skills, slash commands and plugins load from the same .claude folders Claude Code uses.

Permissions combine allow, deny and ask rules with modes from plan only to fully automatic, and a callback routes anything unresolved to a person for approval or a clarifying answer. Sessions can be resumed or forked, SessionStore adapters for S3, Redis and Postgres keep transcripts across hosts, file checkpointing rewinds edits, and structured outputs return results in a set schema. OpenTelemetry export covers every model request, tool call and permission wait, and the message stream reports cost for each session.

The SDK itself costs nothing. Agents bill at Claude API token rates, from Haiku 5.5 at $0.10 per million input tokens on prompts up to 100,000 tokens to Opus 5.5 at $4, with web search at $10 per 1,000 searches, or through the customer's Amazon Bedrock, Google Cloud or Microsoft Foundry account. Customers host the agent on their own infrastructure, from Docker and Kubernetes to sandbox providers, behind egress proxies that inject credentials, with per tenant isolation settings and security audit events that can feed a SIEM, and the cloud routes offer regional endpoints. Agents run only on Claude models.

It fits engineering teams that want the Claude Code agent loop inside their own product or back office, such as support triage, research, document processing or code maintenance agents, and that are ready to host, isolate and monitor those processes themselves. It fits less well for teams wanting a hosted agent with no infrastructure to run, which Anthropic serves through Managed Agents, for buyers who need models from other providers, or for anyone wanting ready made agents rather than a library to build them.

Vendor details

Canonical URL

https://code.claude.com/docs/en/agent-sdk/overview

Category

Agent infrastructure

Subcategory

Anthropic's Python and TypeScript library that embeds the Claude Code agent loop, tools, permissions and sessions in customers' own applications

Funding status

A product of Anthropic.

Company status

first party product

Use cases & customers

Primary use cases

embedding a Claude agent loop in an applicationheadless coding and code maintenance agentssupport, email and research agentsdocument and data processing agentsmulti tenant agent services with custom tools

Target customers

engineering teams building agents into their own productsplatform teams automating code and operations workdevelopers using Claude Code who want the same agent in code

Deployment options

Self hosted in the customer's own containers, Kubernetes or sandbox providersModels via the Claude API, Claude Platform on AWS, Amazon Bedrock, Google Cloud or Microsoft FoundryLocal development on macOS, Linux and Windows

Integrations

Built in tools for files, shell, code search, web search and web fetch; custom tools as in process MCP servers and any external MCP server; Claude models through the Claude API, Claude Platform on AWS, Amazon Bedrock, Google Cloud's Agent Platform and Microsoft Foundry; SessionStore adapters for S3, Redis and Postgres; OpenTelemetry export to any OTLP backend; hosting examples for Docker, Modal and Kubernetes.

In practice

A SaaS company builds a support triage agent that reads incoming tickets, searches its knowledge base through an MCP server and drafts replies. Each tenant runs in its own container and working directory, and a PreToolUse hook blocks any tool call outside the allowed list.

A platform team runs nightly dependency upgrades: an ephemeral container starts the agent with a task prompt, the agent edits files, runs the test suite through Bash and stops after a set number of turns, with traces sent to the team's collector.

A research product keeps sessions in a Postgres SessionStore, so a user can pause a deep research task, return hours later on a different host and resume the same session with its full transcript.

Agentic Index coverage score

10.0 / 14 capabilities · 71%

Integrations & Tool Calling Full

Built in tools read, write and edit files, run shell commands, find files, search code and search or fetch the web, and the agent picks which to call at each step. Custom tools run as in process MCP servers inside the application, external MCP servers connect databases, browsers and APIs, and tool search loads definitions on demand so an agent can work across a large tool set without crowding its context.

Sourcecode.claude.com/docs/en/agent-sdk/overviewread 2026-11-18

Workflow Orchestration Full

A single query starts the agent loop, in which Claude plans its own steps, calls tools, reads the results and decides when the task is done, while the SDK handles tool execution, context management and retries. Subagents defined in the options take focused subtasks in fresh contexts and can run in parallel, todo tracking follows multistep work, and turn limits bound how long a run may continue.

Sourcecode.claude.com/docs/en/agent-sdk/quickstartread 2026-11-18

Knowledge Grounding & RAG Partial

Agents ground themselves by reading and searching the working directory directly, with project instructions from CLAUDE.md and rules files loaded at session start and skills loaded on demand when relevant. MCP servers reach a company's databases and internal systems, and web search brings in public sources. There is no managed vector store or retrieval index, so any embedding search runs in a tool the developer supplies.

Sourcecode.claude.com/docs/en/agent-sdk/claude-code-featuresread 2026-11-18

Human Oversight & Guardrails Full

Permissions combine allow, deny and ask rules with modes ranging from plan only, where edits always need approval, to fully automatic, and a canUseTool callback sends anything unresolved to a person for approval or a clarifying answer. PreToolUse hooks run before every call and can deny it even in bypass mode, deny rules block matching commands in every mode, and removals of critical paths always need explicit approval.

Sourcecode.claude.com/docs/en/agent-sdk/permissionsread 2026-11-18

Security, Identity & Governance Full

The library has no user accounts of its own; it authenticates to Claude with an API key or through Amazon Bedrock, Google Cloud or Microsoft Foundry credentials, and honors managed policy and server managed settings set by an organization's administrators. Deployment hardening covers sandboxed containers, egress proxies that inject credentials outside the agent, per tenant settings isolation, and security audit events tagged with end user identity for a SIEM.

Sourcecode.claude.com/docs/en/agent-sdk/hostingread 2026-11-18

Observability & Auditability Full

OpenTelemetry export sends traces, metrics and log events to any OTLP backend, with spans for each interaction, model request, tool call, permission wait and hook, and subagent spans nested under the parent so a whole delegation chain reads as one trace. Counters cover tokens, cost, sessions and tool decisions, prompt and tool content stay out of exports unless enabled, and the message stream reports cost for each session.

Sourcecode.claude.com/docs/en/agent-sdk/observabilityread 2026-11-18

Memory & State Persistence Full

Sessions keep context across exchanges and can be resumed by ID or forked into a new branch, and SessionStore adapters for S3, Redis and Postgres mirror transcripts to durable storage so a session survives container restarts and moves between hosts. Auto memory and CLAUDE.md files carry facts across sessions, and file checkpointing lets an application rewind the edits an agent made during a run.

Sourcecode.claude.com/docs/en/agent-sdk/hostingread 2026-11-18

Deployment & Data Residency Full

Customers host the agent wherever they run code, from a laptop to Docker, Kubernetes, Modal or a sandbox provider, using ephemeral, long running, hybrid or multi agent container patterns, with no Anthropic hosted runtime involved. Model calls go to the Claude API, Claude Platform on AWS, Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry, and the cloud routes support regional endpoints.

Sourcecode.claude.com/docs/en/agent-sdk/hostingread 2026-11-18

Prebuilt Agents / Templates / Packs Partial

Example agents such as an email assistant and a research agent, plus a hosting cookbook with Docker, Modal and Kubernetes code, give starting points rather than finished agents. Skills, slash commands, subagents and plugins load from the same .claude folders Claude Code uses, and plugins package skills, agents, hooks and MCP servers, but they load by local path rather than from a marketplace inside the SDK.

Sourcecode.claude.com/docs/en/agent-sdk/overviewread 2026-11-18

Triggers & Channel Coverage Not documented

Nothing starts an agent on its own: every run begins when the developer's application calls query, whether from a web request, a queue worker, a CI job or a container started with a task prompt. Long running services can feed a live session new turns as messages arrive, but schedules, webhooks and channel connectors such as email or Slack are code the developer writes and hosts around the library.

Sourcecode.claude.com/docs/en/agent-sdk/hostingread 2026-11-18

Model Flexibility & Routing Not documented

Every agent runs on Anthropic's Claude models. Developers choose among Claude models per agent or subagent and choose where they are served, through the Claude API, Claude Platform on AWS, Amazon Bedrock, Google Cloud or Microsoft Foundry, but not the model maker, so a team that needs models from other providers has to build on a different framework. Model calls can pass through a proxy the team controls.

Sourcecode.claude.com/docs/en/agent-sdk/quickstartread 2026-11-18

APIs / SDKs / MCP Extensibility Full

The product is itself the extension surface: Python and TypeScript packages expose the agent loop, options, streaming input and output, hooks, custom tools, MCP connections, plugins and structured outputs with JSON schemas, and other languages drive the same loop by running the CLI headless with JSON output. Hook callbacks, permission callbacks and session stores are all interfaces the developer implements.

Sourcecode.claude.com/docs/en/agent-sdk/overviewread 2026-11-18

Testing, Debugging & Optimization Partial

Per session cost and token tracking, traces of every tool call, structured outputs checked against a schema and file checkpointing that rewinds edits all support debugging of individual runs. There are no evaluation suites, scored test sets or comparisons between agent versions inside the SDK, so measuring agent quality falls to the team's own harness or a separate evaluation tool.

Sourcecode.claude.com/docs/en/agent-sdk/observabilityread 2026-11-18

Browser / Computer-use Partial

Built in web search and web fetch let agents look up and read live pages, and MCP servers connect browsers for agents that need to click and type through sites. The SDK has no browser or desktop control tool of its own, so interactive browsing depends on the MCP server the developer attaches, while the agent's own web tools only search and read pages.

Sourcecode.claude.com/docs/en/agent-sdk/quickstartread 2026-11-18

The Agentic Index coverage score grades every vendor Full, Partial or Not documented against the same 14 buyer facing capabilities, from public evidence only. Each capability links to how all vendors in the index score on it. How this evidence is graded

Pricing

The SDK is free; agents bill at Claude API token rates, from Haiku 5.5 at $0.10 input and $0.50 output per million tokens to Opus 5.5 at $4 and $20, with web search at $10 per 1,000 searches.

Tokens per Claude model at API rates, plus per use charges for tools such as web search; the SDK itself carries no fee.

Trial available

What is public

The Agent SDK is free to install. Its agents bill at Claude API token rates per million tokens: Haiku 5.5 at $0.10 input and $0.50 output for prompts up to 100,000 tokens, Sonnet 5.5 at $2 and $10, Opus 5.5 at $4 and $20, and Fable 5.2 at $8 and $40.

Billing mechanics

Usage bills to the Anthropic account behind the API key, or to the customer's Amazon Bedrock, Google Cloud or Microsoft Foundry account. Cache reads cost a twentieth of the input price on Opus 5.5 and Sonnet 5.5, and web search costs $10 per 1,000 searches.

Cost watchouts

Agent loops call the model many times per task, and subagents, tool results and long sessions all add tokens. Regional endpoints on Amazon Bedrock and Google Cloud cost 10% more than global ones.

Variable cost rationale

Spend scales with the tokens every agent run consumes, which usually outweighs hosting, since a minimal container runs at roughly $0.05 an hour.

Additional watchouts

Hosting is the customer's own cost and work, at roughly $0.05 an hour for a minimal container, while Managed Agents, Anthropic's hosted alternative, adds $0.08 per running session hour.

Sales call required

No, self serve available

Free / trial

The SDK is free to install, and new Claude API accounts start with free test credits.

Lowest paid plan

No plan, with pay as you go Claude API usage per token

Commercial notes

Use is governed by Anthropic's Commercial Terms of Service, including for products built on the SDK and offered to the customer's own users, and claude.ai logins and plan limits may not be offered to those users without Anthropic's approval.

Missing data

Anthropic gives no figure for the free credits new API accounts receive.

Agentic Index verified 2026-11-18

Alternatives to Claude Agent SDK

Other products that do the work Claude Agent SDK does, and what each one is.

Contact us

Found a vendor we missed? Have feedback on the index? We'd love to hear from you.