AgenticFrameworksMCP

Claude Agent SDK Overview

by Anthropic

IntermediateDocumentationFree~10 min read; ~1 hour including the linked quickstart

Claude Code's agent loop as a Python or TypeScript library — and when not to use it.

Start LearningAdded Jul 7, 2026 · Updated Aug 18, 2026

Overview

The Agent SDK overview is Anthropic's entry point for building agents on the same loop, tools and context management that power Claude Code, exposed as a library. It opens with a decision table that is the page's most useful content: use the Agent SDK when you want the tool loop run for you inside your own process; the Claude Code CLI for interactive terminal work and one-off tasks; the Client SDK when you intend to implement the tool loop yourself against the Anthropic API; and Managed Agents, a separate hosted product where Anthropic runs the agent and the sandbox, for long-running or asynchronous work. The SDK ships for Python and TypeScript only — other languages are told to run the CLI as a subprocess with `-p` and `--output-format json`. A capability table then maps each Claude Code feature to its own guide: built-in file, shell and web-search tools; hooks that run custom code at lifecycle points; subagents for focused subtasks; MCP for external tools and data sources; a permission system separating auto-run tools from approval-gated ones; sessions that persist, resume and fork; and skills, slash commands and memory loaded automatically from `.claude/` and `~/.claude/`, plus plugins that package all of those together. The page closes with partner branding rules, commercial licensing terms, an explicit prohibition on offering claude.ai login or rate limits to third-party users, and links to the Python and TypeScript changelogs and demo repositories.

At a Glance

Topic
Agentic
Level
Intermediate
Format
Documentation
Cost
Free
Duration
~10 min read; ~1 hour including the linked quickstart
Provider
Anthropic
Hands-on
No
Certificate
None

What You’ll Learn

  • When to pick the Agent SDK over the CLI, Client SDK or Managed Agents
  • Which Claude Code capabilities are available programmatically from the SDK
  • How hooks let you run custom code at points in the agent lifecycle
  • How subagents isolate focused subtasks from the main agent context
  • How the permission system separates auto-run tools from approval-gated ones
  • How sessions persist, resume and fork an agent conversation
  • How to drive the same agent loop from another language via a CLI subprocess

Highlights

  • A decision table that plainly tells you when NOT to use the SDK
  • The same agent loop that ships in Claude Code, not a cut-down version
  • Python package is `pip install claude-agent-sdk`, MIT-licensed, ~7.9k GitHub stars
  • Skills, commands and memory load from `.claude/` exactly as in Claude Code
  • States the licensing and branding constraints up front, before you build on it

Who It’s For

Best For

  • Developers embedding a coding or operations agent in their own product
  • Teams that want Claude Code's tool loop without reimplementing it
  • Engineers deciding between the Agent SDK and raw Messages API calls

Prerequisites

  • Python 3.10+ or TypeScript, plus an Anthropic API key
  • Understanding of what an agent loop and a tool call are

FAQ

What is Claude Agent SDK Overview?

The official entry point for building agents on the same loop, tools and context management that power Claude Code. It opens with a decision table separating the Agent SDK from the CLI, the Client SDK and hosted Managed Agents, then maps every capability — hooks, subagents, MCP, permissions, sessions, skills, plugins — to its own guide. For developers embedding an agent in their own product.

Is Claude Agent SDK Overview free?

Claude Agent SDK Overview is free to access.

What level is Claude Agent SDK Overview for?

Claude Agent SDK Overview is aimed at a intermediate audience. Recommended background: Python 3.10+ or TypeScript, plus an Anthropic API key, Understanding of what an agent loop and a tool call are.

How long does Claude Agent SDK Overview take?

Expect roughly ~10 min read; ~1 hour including the linked quickstart. Most learners work through it at their own pace.

What will I learn from Claude Agent SDK Overview?

You'll learn: When to pick the Agent SDK over the CLI, Client SDK or Managed Agents; Which Claude Code capabilities are available programmatically from the SDK; How hooks let you run custom code at points in the agent lifecycle; How subagents isolate focused subtasks from the main agent context; How the permission system separates auto-run tools from approval-gated ones; How sessions persist, resume and fork an agent conversation; How to drive the same agent loop from another language via a CLI subprocess.

Topics

claude-agent-sdkagentsclaude-codemcppythontypescript

Sources

This page was written from 2 sources, 1 on domains other than code.claude.com.

  1. 1.code.claude.comoverviewvendor
  2. 2.github.comclaude agent sdk python