loading
loading
Anthropic's library for building your own agents with the same loop, tools, and harness that powers Claude Code.
The Agent SDK (formerly the Claude Code SDK) gives you programmatic access to the agent loop — model calls, tool execution, context management, subagents, MCP — so you can embed Claude Code's machinery in your own app instead of driving it from the terminal. You define tools and permissions in code and the SDK runs the read-act-observe loop for you. Example: a CI bot that triages issues by spawning an SDK agent with file and GitHub tools. It's the difference between scripting the CLI and building a real product on the same foundation.
Plainly
Think of Agent SDK as a tool from the builder toolbox. Anthropic's library for building your own agents with the same loop, tools, and harness that powers Claude Code.
In practice
Use it when you are installing, editing, testing, reviewing, or shipping code. In practice, define the owner, input, output, and failure mode before you rely on it.