Claude Agent SDK logo

Claude Agent SDK

Visit

Anthropic agent library. Python 7,910 stars, MIT.

Share:
View alternatives

Claude Agent SDK

Claude Agent SDK is Anthropic's library for running the Claude Code agent loop inside your own process. Python is anthropics/claude-agent-sdk-python (7,910 stars, MIT). TypeScript is anthropics/claude-agent-sdk-typescript (1,702 stars). It is not pip install anthropic and not github.com/anthropics/anthropic-sdk-python. That Messages client is a different SDK.

Compare Claude Code if you wanted the interactive CLI, OpenAI Agents SDK if you wanted OpenAI's agent library, and Cline if you wanted a $0 editor agent instead of a library.

Key Features

  • Library, not the Messages client: Docs say the Agent SDK gives you the same tools, agent loop, and context management as Claude Code, in Python and TypeScript.
  • Install the agent packages: pip install claude-agent-sdk and npm install @anthropic-ai/claude-agent-sdk. Do not paste the leftover from anthropic import Anthropic snippet as the getting-started path.
  • Sessions, MCP, subagents, hooks: The live overview lists sessions, streaming, MCP, tool search, subagents, skills, plugins, permissions, hooks, checkpoints, and OpenTelemetry. Confirm the page you opened; do not freeze Sonnet 4.5 as the only model.
  • Hosted vs in-process: Anthropic also sells a CLI and managed agents. Use the docs comparison table instead of calling this SDK the only official agent product.

Use Cases

  • People embedding Claude Code in an app who need the loop in-process.
  • People who installed anthropic by mistake and need the correct repo.
  • Teams comparing Agent SDK vs CLI after they see the official table.

API tokens are billed on Anthropic's platform.

Pricing

The SDK repos are open. Model use is Anthropic API billing.

Piece Price Notes from first-party pages
Python Agent SDK $0 library MIT. 7,910 stars on the check date.
TypeScript Agent SDK $0 library 1,702 stars. License field empty on GitHub.
Claude tokens API Confirm Anthropic API pricing. Not a ChatGPT Pro seat.
Not this SDK anthropic Messages client Different repo and install.

If a leftover page still points at anthropic-sdk-python and client.messages.create, treat this table as the source.

Getting Started

  1. Read the overview.
  2. Install claude-agent-sdk (Python) or @anthropic-ai/claude-agent-sdk (TypeScript).
  3. Confirm Claude Code if you wanted a terminal UI instead of a library.
  4. Do not pip install anthropic for this product.

Frequently Asked Questions

Is this the official Anthropic Python SDK?

No. That is anthropic-sdk-python. This product is claude-agent-sdk.

Is it still called Claude Code SDK?

Docs now say Agent SDK. The loop is the Claude Code loop as a library.

Does it include Sonnet 4.5 forever?

No. Confirm the live model list. Do not freeze 4.5 as the catalog.

Alternatives

Tips

  1. Quote claude-agent-sdk and 7,910 stars.
  2. Do not point website at anthropic-sdk-python.
  3. Confirm TypeScript license before you call both repos MIT.

Conclusion

Claude Agent SDK is Anthropic's in-process Claude Code library, not the Messages Python client. Start at the overview, then decide whether Claude Code already covers the interface you need.

Comments

No comments yet. Be the first to comment!