AI GLOSSARY · AI CONCEPTS

Claude Agent SDK

Markdown version

Definition

Claude Agent SDK is Anthropic's Python and TypeScript library for programmatically running the Claude Code binary and using its documented agent capabilities.

Also called: Claude Code SDK.

In plain language

The Claude Agent SDK lets a Python or TypeScript application run the Claude Code binary and drive its agent loop. Instead of a person operating an interactive terminal session, application code supplies tasks and handles results. Anthropic documents built-in file and command tools, permissions, sessions, hooks, subagents, MCP connections, and project configuration. Its quickstart uses an agent that finds and fixes bugs. Programs that enable consequential tools still need deliberately chosen permissions and configuration.

Technical definition

Anthropic describes the SDK as a library that runs the Claude Code binary in a process operated by the developer. It exposes the documented agent loop, context management, built-in tools, hooks, permissions, sessions, subagents, MCP connections, skills, commands, memory, and plugins. The former Claude Code SDK packages were renamed to claude-agent-sdk for Python and @anthropic-ai/claude-agent-sdk for TypeScript. From v0.1.0, a minimal system prompt is the default; the Claude Code preset must be requested explicitly. Filesystem setting sources load by default unless explicitly isolated as documented.

Worked examples in this catalogue

Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.

  1. Guide · Illustrative, not executed

    What Is Claude Code and What It Can Touch on Your Machine

    What you see
    Illustrative guide to Claude Code surfaces, file and command access, permission modes, rules, and hooks.
    Why it exercises the concept
    The SDK runs the Claude Code binary and exposes related capabilities, so the guide provides useful operational context. It covers Claude Code generally, not the SDK API.
  2. Guide · Illustrative, not executed

    How to Build an AI Agent: A Minimal Tool Loop

    What you see
    Illustrative minimal agent loop that sends tools, executes requested operations, returns matching results, and stops after a fixed number of steps.
    Why it exercises the concept
    Helps readers see what an agent loop does. It uses the direct Claude API, so it is a comparison with the lower-level client approach rather than Agent SDK code.
  3. Guide · Illustrative, not executed

    Claude Code Subagents: When to Delegate and How to Scope Tools

    What you see
    Illustrative guide to defining Claude Code subagents with separate context and scoped tool lists.
    Why it exercises the concept
    Subagents are among the capabilities listed for the Agent SDK. The guide documents Claude Code configuration and does not replace the SDK reference.

How it shows up when you use agents

The Claude Agent SDK matters when application code, rather than a person in an interactive Claude Code session, must initiate and drive an agent. Anthropic describes it as a Python and TypeScript library that runs the Claude Code binary in a process the developer operates. It provides programmatic access to the documented agent loop and capabilities, including built-in tools, permissions, sessions, hooks, subagents, MCP connections, and project configuration.

An illustrative use from Anthropic's quickstart is an agent that finds and fixes bugs in existing code. That example shows the intended execution shape; it does not establish that every application should grant file editing or command execution. A reader embedding the SDK should first list the tools required for one narrow task, decide which calls can run automatically, and identify which calls require approval. In CI, tests, deployed applications, and multi-tenant systems, also decide whether local Claude settings should load.

That configuration choice is easy to miss. The migration guide says that omitting settingSources loads user, project, and local filesystem settings, including settings files, CLAUDE.md, and custom commands. Passing an empty list requests isolation, subject to the documented Python-version caveat. Review the current migration guidance before relying on that behavior.

See Agent loop, Agent hooks, and Subagent for the underlying concepts.

Common confusions

  • The SDK is not the interactive Claude Code interface. Claude Code's CLI is designed for terminal use; the SDK lets a Python or TypeScript application drive the agent.
  • It is not merely the direct Claude client library. Anthropic says direct client SDK users write the tool loop themselves or use the client's tool runner. The Agent SDK runs the Claude Code agent loop.
  • It is not Anthropic-hosted Managed Agents. The Agent SDK runs in a process the developer operates; Managed Agents provides a hosted harness.
  • Claude Code SDK is the former name. Migration requires new package names and imports, plus review of breaking changes.
  • “Agent SDK” alone is ambiguous. Other vendors publish agent SDKs, so references and links should use the Claude-qualified name.

Terms that mention Claude Agent SDK

1 terms mention this one

More in AI concepts

Next steps

  1. What Is Claude Code and What It Can Touch on Your Machine The long-form guide.
  2. Agent harness Related term.
  3. Agent loop Related term.
  4. All glossary terms A to Z and by family.

Sources

Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-25. Wikipedia is never the only source.

Review record

Last verified

Drafted by claude-sonnet-5-5; revisions: OpenAI Codex (configured gpt-5.6-sol); sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-25. Last verified .

Change log (5)
  • : Independent automated factual/example/alias correction review closed with transparent bounded followups and simulated-reader blocker closure. Cached broad US definition demand; AI-exclusive share unmeasured. Final runtime gate separate; publication disabled.
  • : Private correction of independent source/example/alias and reader findings; exact-version closure and runtime gates pending. Cached broad US definition demand, not AI-exclusive traffic.
  • : First version.
  • : Verifier pass: applied verifier corrections to wording and attributions.
  • : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.