Glossary · Anthropic

Claude Agent SDK

The Claude Agent SDK is Anthropic's open-source framework for building production agents on top of Claude. Definition, capabilities, and when to use it.

By Kadin Nestler · May 28, 2026 · Updated May 28, 2026

What the SDK provides

The SDK abstracts the agent loop: model invocation, tool dispatch, conversation state, error handling, retries, observability hooks. It supports MCP servers natively, ships built-in tools for filesystem, code execution, and web fetch, and exposes session management for long-running agents. The same patterns power Claude Code, Anthropic's own coding agent product.

When to use the SDK vs raw API

  • Use the SDK when you are building a real agent: multi-step, tool-calling, stateful.
  • Use raw API calls when you are doing single-turn generation, classification, or extraction.
  • Use the SDK when you want MCP plug-and-play with existing tool servers.
  • Use raw API calls when you need the absolute thinnest dependency tree and full control over the loop.

How it compares to LangChain, LlamaIndex, and CrewAI

LangChain and LlamaIndex are vendor-neutral and broader, supporting many models with extensive abstraction layers. The Claude Agent SDK is Anthropic-first, opinionated, and closer to the metal — fewer abstractions, less magic, easier to debug. CrewAI focuses on multi-agent orchestration patterns. The right choice depends on whether you need vendor portability (LangChain) or whether you have committed to Claude as your primary model (Agent SDK).

Practical implications

The Agent SDK launched in late 2025 and quickly became the recommended path for new Claude-based agent projects. It is open-source (MIT-licensed), Python and TypeScript, and updated alongside model releases. For SMBs hiring an AI agency, ask whether the agency builds on the SDK directly or wraps it in their own framework — the former is more portable, the latter usually means the agency wants to retain control.

What it means for your business

When an AI vendor says they build on the Claude Agent SDK, that is a positive portability signal. When they say they have built their own proprietary framework on top, ask what you actually own at the end of the engagement.

  • AI Agent — An AI agent is an LLM-driven program that uses tools to complete tasks autonomously. Definition, architecture, and real SMB examples.
  • Claude Opus — Claude Opus is Anthropic's most capable model, tuned for deep reasoning, long context, and agentic coding. Definition, pricing, and when to use it.
  • Model Context Protocol (MCP) — MCP is an open standard for connecting AI models to tools, data, and APIs. Definition, ecosystem, and why it matters for AI interoperability.
  • Tool Use — Tool use is when an LLM calls external APIs, databases, or code on its own. Definition, function calling, and how it powers AI agents.
  • Claude Code — Claude Code is Anthropic's terminal-based AI coding agent — reads your repo, runs commands, edits files, and ships PRs. Definition, pricing, and use cases.