Claude Agent SDK

The Claude Agent SDK is Anthropic's opinionated framework for building agents that use Claude. Built on the same primitives as Claude Code, it handles tool use, multi-turn orchestration, and sub-agents.

What it provides

When to use

When it's not the right fit

Relationship to Claude Code

Claude Code is the end-user CLI. The Agent SDK is the library you'd use to build your own agents with similar capabilities. Think of Claude Code as an agent built with the SDK.

MCP integration

Model Context Protocol is Anthropic's standard for tool servers. The Agent SDK natively supports MCP servers, so you can plug in community-built tool providers without writing glue code.

Getting started

See docs at anthropic.com. Typical starter: npm/pip install the SDK, define tools, define system prompt, launch agent loop. Most production agents fit in a few hundred lines of code.