What's the difference between the Claude Agent SDK and the Claude API?
The Claude Agent SDK ships a complete agent loop; the Claude API, which Anthropic calls the Client SDK when you use it directly, gives you raw model access and leaves the loop to you. Anthropic’s own comparison draws the line exactly there: the Client SDK offers “direct access to the Claude API,” where “you write the tool-calling loop yourself, or let the client SDK’s beta tool runner drive it,” while the Agent SDK is “a library that runs the Claude Code binary,” carrying Claude Code’s built-in tools, permissions, sessions, and hooks along with it. Reach for the Client SDK when you’re calling Claude for a single completion or want to own the loop yourself; reach for the Agent SDK when you want Claude Code’s own agent, file tools, and permission model already wired up. A third option, Managed Agents, has Anthropic run that same agent loop for you in a hosted sandbox instead of a process you operate.
sources
- Agent SDK overview, Anthropic fetched