Claude Agent SDK
Anthropic's SDK for building agents on Claude, with tools, subagents, and managed context.
The Claude Agent SDK is the framework behind Anthropic's own agent products, made available for building your own. It handles the agent loop, tool use, subagents, and, notably, context management, compacting long histories so an agent can run without exhausting its window.
It is built around Claude and the Model Context Protocol, so tools exposed over MCP plug in directly.
Where it fits
A strong fit when building agents on Claude that run long, use many tools, and need context handled rather than hand-managed.
Where it does not fit
Tied to Claude: not the choice when a project must stay model-agnostic across providers.
Alternatives to Claude Agent SDK
The closest options on the map, and where each fits instead.
-
OpenAI Agents SDK Lightweight agent SDK
A good fit when you want a minimal agent loop with handoffs and tracing, and you are already building on OpenAI models.
-
LangGraph Graph orchestration
Reach for LangGraph when an agent needs real branching (loops, retries, human-in-the-loop pauses) and you want that control flow written down explicitly.
Unlike Claude Agent SDK Maturity: established
-
Pydantic AI Type-safe agent framework
A strong fit for Python teams who want agent code that is statically typed and whose outputs are validated by construction.
Pairs with
Commonly used alongside it.