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 loops - 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 | Simple one-shot calls | You manage everything | | Agent SDK (client-side) | Custom agents wit…