Skip to content

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.

Pairs with

Commonly used alongside it.