agent-sdk-quickstart
Installation
SKILL.md
Claude Agent SDK — Quickstart
The Claude Agent SDK is Anthropic's framework for building agents. It handles the tool-use loop, context compaction, sub-agent spawning, and MCP integration so you don't reinvent them.
When to Use
- Starting a new agent project
- Migrating from hand-rolled
messages.createloops - Need sub-agent orchestration, compaction, or skills out-of-box
- Building CLI tools, automation, or backend agents
SDK vs Direct API vs Managed Agents
| Approach | Best for | Tradeoff |
|---|---|---|
Direct messages.create |
Simple one-shot calls | You manage everything |
| Agent SDK (client-side) | Custom agents with full control | You run the loop, manage state |
Managed Agents API (/v1/agents) |
Production agents at scale | Anthropic runs the loop server-side |