# Claude Agent SDK

> Canonical: https://skillalmanac.com/glossary/claude-agent-sdk | Last verified: 2026-11-25 | Index status: index-eligible

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.

## 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](/glossary/agent-loop), [Agent hooks](/glossary/agent-hooks), and [Subagent](/glossary/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.

## Worked examples in this catalogue

### [What Is Claude Code and What It Can Touch on Your Machine](https://skillalmanac.com/learn/what-is-claude-code)

Status: illustrative example from the item's own documentation, not executed for this page.

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.

### [How to Build an AI Agent: A Minimal Tool Loop](https://skillalmanac.com/learn/build-an-ai-agent)

Status: illustrative example from the item's own documentation, not executed for this page.

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.

### [Claude Code Subagents: When to Delegate and How to Scope Tools](https://skillalmanac.com/learn/claude-code-subagents-guide)

Status: illustrative example from the item's own documentation, not executed for this page.

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.

## Related terms

- [AI agent framework](https://skillalmanac.com/glossary/ai-agent-framework.md)
- [Agent harness](https://skillalmanac.com/glossary/agent-harness.md)
- [Coding agent](https://skillalmanac.com/glossary/coding-agent.md)
- [Agent loop](https://skillalmanac.com/glossary/agent-loop.md)
- [Subagent](https://skillalmanac.com/glossary/subagent.md)
- [Agent hooks](https://skillalmanac.com/glossary/agent-hooks.md)

## Sources

- [Agent SDK overview](https://code.claude.com/docs/en/agent-sdk/overview), Anthropic (accessed 2026-11-25)
- [Migrate to Claude Agent SDK](https://code.claude.com/docs/en/agent-sdk/migration-guide), Anthropic (accessed 2026-11-25)
- [Claude Code overview](https://code.claude.com/docs/en/overview), Anthropic (accessed 2026-11-25)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-25. [Glossary index](https://skillalmanac.com/glossary.md).
