SpyBara
Go Premium

agent-sdk/overview.md 2026-07-27 21:02 UTC to 2026-07-28 23:57 UTC

37 added, 636 removed.

2026
Wed 29 07:01 Tue 28 23:57 Mon 27 21:02 Sun 26 19:02 Sat 25 21:59 Fri 24 23:01 Thu 23 23:57 Wed 22 23:59 Tue 21 23:00 Mon 20 23:01 Sat 18 16:02 Fri 17 22:57 Thu 16 22:59 Wed 15 22:00 Tue 14 23:01 Mon 13 23:57 Sat 11 19:03 Fri 10 17:00 Thu 9 23:58 Wed 8 16:02 Tue 7 16:02 Mon 6 23:57 Sat 4 03:01 Fri 3 23:00 Thu 2 23:59 Wed 1 21:01

Agent SDK overview

Build production AI agents with Claude Code as a library

An agent is an application that completes a task by planning its own steps and calling tools that read files, run commands, or edit code. The Agent SDK gives you the same tools, agent loop, and context management that power Claude Code, programmable in Python and TypeScript.

Compare the Agent SDK to other Claude tools

The Agent SDK, the CLI, the Client SDK, and Managed Agents each fit different needs. Use the table to find the one that matches what you're building.

If you're... Use Why
Building an agent without implementing the tool loop yourself Agent SDK A library that runs the agent loop in your own process, in Python or TypeScript.
Doing interactive development or running one-off tasks from a terminal Claude Code CLI The terminal interface, built for daily interactive use.
Calling the API directly and implementing the tool loop yourself Client SDK Direct access to the Anthropic API rather than to Claude Code. You implement the tool loop yourself.
Running long-running or asynchronous agents without managing your own sandbox or session infrastructure Managed Agents Hosted REST API, a separate product from the Agent SDK. Anthropic runs the agent and the sandbox.

The SDK is available as a library for Python and TypeScript only. To drive the same agent loop from another language, run the CLI as a subprocess with the -p flag and --output-format json.

Capabilities

Everything that makes Claude Code powerful is available in the SDK.

Capability What it does Learn more
Built-in tools Read, write, edit files, run commands, and search the web Tools reference
Hooks Run custom code at key points in the agent lifecycle Hooks
Subagents Spawn specialized agents for focused subtasks Subagents
MCP Connect external tools and data sources via the Model Context Protocol MCP
Permissions Control which tools run automatically, which need approval Permissions
Sessions Maintain context across exchanges, resume or fork later Sessions
Skills, commands, and memory Load automatically from your project's .claude/ and from ~/.claude/, same as Claude Code Skills, Commands, Memory, Configuration loading
Plugins Package skills, agents, hooks, and MCP servers, and load them by local path Plugins

Get started

Follow the Quickstart to install the SDK, set your API key, and build your first agent, one that finds and fixes bugs in existing code.

Changelog

View the full changelog for SDK updates, bug fixes, and new features:

Report bugs

If you encounter bugs or issues with the Agent SDK:

Branding guidelines

For partners integrating the Claude Agent SDK, use of Claude branding is optional. When referencing Claude in your product:

Allowed:

  • "Claude Agent", preferred for dropdown menus
  • "Claude", when within a menu already labeled "Agents"
  • "{YourAgentName} Powered by Claude", if you have an existing agent name

Not permitted:

  • "Claude Code" or "Claude Code Agent"
  • Claude Code-branded ASCII art or visual elements that mimic Claude Code

Your product should maintain its own branding and not appear to be Claude Code or any Anthropic product. For questions about branding compliance, contact the Anthropic sales team.

License and terms

Use of the Claude Agent SDK is governed by Anthropic's Commercial Terms of Service, including when you use it to power products and services that you make available to your own customers and end users, except to the extent a specific component or dependency is covered by a different license as indicated in that component's LICENSE file.

Next steps

These resources cover deeper technical detail and example projects for building with the Agent SDK.

  • Quickstart: build your first agent that finds and fixes bugs
  • Agent loop: how Claude plans, calls tools, and decides when a task is done
  • Example agents: demo apps for local development
  • TypeScript SDK: full TypeScript API reference and examples
  • Python SDK: full Python API reference and examples
  • Agent harness design: how the Claude Code team uses dynamic workflows to orchestrate subagents at scale