SpyBara
Go Premium

agent-sdk/overview.md 2026-09-20 23:59 UTC to 2026-09-21 22:59 UTC

This page contains 8 additions and 8 deletions.

2026
Fri 4 23:59 Sun 13 21:00 Mon 21 22:59

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 differ in who runs the agent, what comes built in, and how you reach it. Find the row that matches how you want to build and run yours.

You want to Use What you get
Embed Claude Code's agent in your own Python or TypeScript application, in a process you operate Agent SDK A library that runs the Claude Code binary, with Claude Code's capabilities, such as built-in tools, permissions, sessions, and hooks.
Do interactive development or run one-off tasks from a terminal Claude Code CLI The terminal interface, built for daily interactive use.
Call the Claude API directly from your own code Client SDK Direct access to the Claude API from any of the client SDK languages. You write the tool loop yourself, or let the client SDK's beta tool runner drive it.
Have Anthropic host the agent, configured through the Claude API Managed Agents A hosted agent harness that runs the agent loop, with sessions in an Anthropic-managed cloud sandbox or a self-hosted sandbox on your own infrastructure. Use it from the SDK for your language, the ant CLI, or the REST API.

To drive the same agent loop from a language other than Python or TypeScript, run the CLI as a subprocess with the -p flag and --output-format json.

Capabilities

These Claude Code capabilities are 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
  • Migration guide: migrate from the Claude Code SDK packages to the Agent SDK
  • 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 many subagents at once