Skip to content
3.6Intermediate7 min

Claude Agent SDK: Building Anthropic-native agents

Blck Alpaca·
Definition

The Claude Agent SDK is Anthropic's official framework for building production-ready AI agents on top of the Claude models. It provides a ready-made agent harness with tool use, native MCP integration, subagents, session and context management, plus an integrated permission and sandbox system. It evolved from the Claude Code SDK (renamed on 29 September 2025).

Key Takeaways

  • The Claude Agent SDK evolved from the Claude Code SDK on 29/09/2025 and ships the same proven toolset as Claude Code (Read/Write/Edit, Bash, Web, File).
  • Core features are subagents, sessions, hooks, integrated permission management and a sandbox, plus native MCP integration via in-process MCP servers.
  • The SDK is tied to Claude models (provider lock-in); EU data residency runs via AWS Bedrock, Google Vertex or Azure AI Foundry rather than the US Anthropic endpoint.
  • As of 2026 the API is still v0.x (TS 0.2.x / Python 0.1.34, Feb 2026) with breaking changes; the code is under Apache 2.0, with usage under the Anthropic Commercial Terms.
  • Best fit: coding agents, research agents and long-running tasks in Anthropic-centric stacks; A2A is not officially supported natively.

The Claude Agent SDK is Anthropic's official framework for building production-ready AI agents directly on the Claude models. Instead of manually programming an agent's tool loop, the SDK provides a ready-made agent harness: automatic tool loops, native MCP integration, subagents, session and context management, plus an integrated permission and sandbox system. It evolved from the Claude Code SDK on 29 September 2025 and uses the same toolset that powers Claude Code.

Three quick answers

  • What it is: An Anthropic-native SDK (Python and TypeScript) that provides managed Claude tool loops, sessions, sandboxing and subagents, i.e. everything you would otherwise have to build yourself around a raw LLM API call.
  • When it fits: Coding agents, research agents and long-running, multi-step tasks in a stack that deliberately commits to Claude models.
  • What to watch out for: Provider lock-in to Claude, an API still at v0.x with breaking changes (as of 2026), code under Apache 2.0 but usage under the Anthropic Commercial Terms.

From the Claude Code SDK to the Claude Agent SDK

The framework was originally called the Claude Code SDK and was the technical foundation of the Claude Code coding agent. With the rename on 29 September 2025, Anthropic deliberately positions it more broadly: not just for coding, but as a general harness for agents with tool use. The core idea remains so-called "dogfooding": developers get exactly the same toolset and the same loop mechanics that Anthropic uses internally for Claude Code, namely Read, Write, Edit, Bash, File and Web tools.

This is the decisive difference from the plain Anthropic Client SDK. With the Client SDK you write the agent loop yourself: call the model, receive the tool call, execute the tool, feed the result back, call again. The Agent SDK takes over precisely this orchestration and supplements it with production building blocks. In "Building Effective Agents" (December 2024), Anthropic itself warns against building such loops by hand for non-trivial tool use, but at the same time recommends the "simplest solution first" principle: if you only need a single API call, you do not need a framework.

The central building blocks

Tool use and the Claude Code toolset. The SDK ships the proven File, Bash and Web tools as well as Read/Write/Edit. This lets an agent read and write files, run shell commands and fetch web content without having to define and secure these tools yourself.

Native MCP integration. The Model Context Protocol (MCP) is natively embedded in the Claude Agent SDK; MCP servers can even be run in-process. MCP standardises access to external tools, data sources and APIs. Since its handover to the Linux Foundation Agentic AI Foundation (AAIF) on 9 December 2025, the protocol has been vendor-neutral; according to Anthropic, it reached over 110 million monthly SDK downloads and more than 10,000 active servers in April 2026. For agencies, this means: integrations built once as an MCP server are reusable outside the Anthropic ecosystem too.

Subagents and sessions. Instead of a classic graph model (as with LangGraph), the SDK relies on subagents and sessions for multi-step and division-of-labour workflows. A main agent can spawn specialised subagents for subtasks; sessions hold the context across multiple steps. There is officially no native A2A support (agent-to-agent protocol), which sets the SDK apart from the Microsoft Agent Framework, CrewAI or Pydantic AI.

Context and permission management plus sandbox. The SDK manages context via the session and includes an integrated permission system as well as sandboxing. In the research's production-readiness assessment, this places the SDK in the top group for security/sandbox. Permissions control which actions an agent may perform, for example which files may be written or which commands may be executed, an important lever for human-in-the-loop and audit requirements.

Observability via hooks. Unlike LangGraph (LangSmith) or Pydantic AI (Logfire), the SDK has no mature first-party observability platform. It works on a hooks basis and integrates with the Anthropic Console. Anyone running pure SDK self-hosting must add their own structured logging for traceability and EU AI Act-relevant evidence.

Positioning within the Anthropic ecosystem

The strength of the SDK lies in its tight coupling to the Claude models and to MCP. In the layer model of frameworks, it sits together with the OpenAI Agents SDK at the agent-runtime/harness level, i.e. one layer above the plain provider SDKs and with a different character from the framework layer (LangGraph, CrewAI, Pydantic AI). This proximity is both an advantage and a limitation: optimisation and toolset are tailored to Claude, but there is no model swap to GPT, Gemini or local models.

Dimension

Claude Agent SDK (as of 2026)

Vendor

Anthropic (US)

Languages

Python, TypeScript

Latest version

TS 0.2.x / Python 0.1.34 (February 2026), API v0.x

Licence

Apache 2.0 (code); usage under Anthropic Commercial Terms

MCP

native (in-process MCP servers)

A2A

not officially native

Multi-agent

subagents + sessions (no graph model)

Security/sandbox

integrated (permissions, sandbox)

Observability

hooks-based, Anthropic Console

Hosting

Anthropic endpoint (US), AWS Bedrock, Google Vertex, Azure AI Foundry; SDK runnable locally

Production users

Stripe (Claude Code), Anthropic internally, Apple Xcode 26.3

On adoption: according to secondary sources, the TypeScript package recorded around 1.85 million weekly NPM downloads (February 2026). With Apple Xcode 26.3, a prominent vendor has natively integrated the SDK. These figures should be understood as a snapshot and re-checked before every publication.

DACH perspective: sovereignty and licensing

For DACH B2B decision-makers, two points are central. First, data residency: the direct Anthropic endpoint is located in the US. For strict EU/GDPR requirements, the path runs via AWS Bedrock (EU region), Google Vertex or Azure AI Foundry. The SDK itself is OSS and runnable locally, but the model endpoint is not, hence the classification "medium sovereignty" compared with fully self-hostable frameworks such as n8n (DE vendor), LangGraph or Pydantic AI.

Second, licensing: the SDK code is under Apache 2.0, but use of the Claude models is under the Anthropic Commercial Terms, not under a purely open-source mindset. This separation belongs cleanly in every vendor evaluation and procurement review.

A concrete example

Suppose an agency builds a research agent that, for each request, searches internal Markdown documents, creates a competitor profile and saves the result as a file. With the Client SDK, the team would have to write the entire tool loop, error handling and context management themselves, which third-party analyses estimate at roughly 40 to over 100 lines of orchestration code for comparable ReAct agents. With the Claude Agent SDK, this is reduced to a configuration:

```python

Pseudocode, Claude Agent SDK (as of 2026, API v0.x)

options = ClaudeAgentOptions(
model="claude-...", # tied to Claude models
allowed_tools=["Read", "Write", "Web"],
permission_mode="ask", # human-in-the-loop for critical actions
mcp_servers=[crm_mcp_server], # native MCP connection, e.g. CRM
setting_sources=[...], # must be set explicitly after the rename
)

Subagent for the pure research, main agent summarises

agent.run("Create a competitor profile for company X.")
```

An important point when migrating from the old naming: ClaudeCodeOptions is now ClaudeAgentOptions, and setting_sources must be set explicitly since the rename. The tool loops, spawning the research subagent, session context management and the permission prompt before writing the file are all handled by the SDK.

For agencies and B2B

The Claude Agent SDK is the right choice when the strategic model decision falls on Claude anyway and the focus is on coding, research or long-running agents. It significantly shortens time-to-production through a proven harness and native MCP connectivity. Anyone who needs model agnosticism, native A2A multi-agent communication, mature first-party observability or full EU sovereignty without a US vendor should instead evaluate LangGraph, Pydantic AI or n8n. Blck Alpaca evaluates the framework, hosting path (Bedrock/Vertex/Azure EU) and licensing implications together for DACH clients, so that a prototype becomes GDPR-compliant production operation. All version, pricing and adoption figures are as of 2026 and should be re-verified before project start.

FAQ

What is the difference between the Claude Agent SDK and the Anthropic Client SDK?
The Anthropic Client SDK requires developers to implement the tool loop themselves (tool call, feed the result back, next model call). The Claude Agent SDK handles these tool loops automatically and adds sessions, subagents, context management, permissions and sandboxing as a ready-made agent harness.
Does the Claude Agent SDK support MCP natively?
Yes. The Claude Agent SDK offers native MCP support and can even run MCP servers in-process. This allows external tools, data sources and APIs to be connected in a standardised way without writing custom adapters. MCP has been vendor-neutral under the Linux Foundation (AAIF) since December 2025.
Which programming languages and models does the SDK support?
The Claude Agent SDK is available for Python and TypeScript. It is tied to Anthropic's Claude models. Access runs via the Anthropic endpoint (US) or via AWS Bedrock, Google Vertex and Azure AI Foundry, which enables EU data residency paths for DACH deployments.
Is the Claude Agent SDK production-ready (as of 2026)?
The library is used in production (for example Stripe in Claude Code, Anthropic internally, Apple Xcode 26.3), but as of February 2026 the API is still v0.x (TS 0.2.x, Python 0.1.34) with possible breaking changes. Pinning versions and watching changelogs is mandatory.
Which use cases is the Claude Agent SDK best suited to?
It plays to its strengths with coding agents, research agents and long-running, multi-step tasks, i.e. wherever the toolset inherited from Claude Code and subagents provide advantages. Ideal for teams with an Anthropic-centric stack; for A2A multi-agent scenarios, native alternatives are a better fit.

Want to go deeper?

Get new analyses straight to your inbox – or see how we put this knowledge to work for companies.