Claude Agent SDK

The Claude Agent SDK is Anthropic's opinionated framework for building agents on Claude. It's built on the same primitives as Claude Code (the CLI), so you get battle-tested orchestration, tool use, sub-agents, and MCP support out of the box. If you're building on Claude, it's usually the right starting point. You trade some flexibility for a big head start.

What the SDK gives you

The relationship to Claude Code

Claude Code is a CLI for end-users. The Agent SDK is the library you'd use to build your own thing with the same capabilities. Claude Code is essentially an agent built with this SDK. If you've used Claude Code and wondered "how would I build that?", the SDK is the answer.

MCP integration

Model Context Protocol is Anthropic's open standard for tool servers. The SDK speaks MCP natively, so any MCP server (from the community or built by you) plugs in without glue code. This matters because MCP is where most of the pre-built tool ecosystem lives: GitHub, Slack, Jira, filesystems, databases, browsers. You get all of those as tools with minimal work.

When the SDK is the right call

When to pick something else

Typical starter shape

1. pip install or npm install the SDK
2. Define your tools (Python functions or TS objects)
3. Write a system prompt describing the agent's role
4. Configure: which MCP servers, budgets, step caps
5. Launch an agent session with a task

Most production agents fit in a few hundred lines. The heavy lifting (loop, retries, tool validation, tracing hooks) is already in the SDK.

What to do with this