Morgan Dutemple
← All of the Agent Library
ApplicationDevelopmentClaude

Claude Agent SDK

This SDK exposes the same building blocks used internally to build Claude Code: tool management, the agentic loop, context caching. It lets you build a custom agent rather than using Claude Code as-is.

The Claude Agent SDK's GitHub repository

Key advantages

  • Officially maintained by Anthropic
  • Exposes the same building blocks Claude Code uses internally
  • Allows fine-grained control over the agent's behavior

Who it's for, and why

Developers who want to build their own custom agent rather than use a finished product.

  • Building a custom agent for a specific business need
  • Integrating Claude into an existing application with agentic logic
  • Rapidly prototyping a new agent before productionizing it

Getting started

  1. 1Install: `pip install claude-agent-sdk` (Python 3.10 or later).
  2. 2The Claude Code CLI is bundled automatically with the package: no separate install needed to get started.
  3. 3To use an existing Claude Code install instead of the bundled one, pass `cli_path` in `ClaudeAgentOptions`.

Things to watch out for

  • A low-level SDK aimed at developers building their own agent: more integration work than using Claude Code directly for someone who just wants a ready-to-use agent.
  • Billed by usage of the underlying model (Anthropic API), to be budgeted separately from development cost.

Frequently asked questions

Do I need to install Claude Code separately to use this SDK?

No, the Claude Code CLI is bundled automatically with the Python package. A separate system install remains possible if a specific path or version is needed.

How is it different from Claude Code itself?

Claude Code is a finished, ready-to-use product; this SDK exposes the same internal building blocks (agentic loop, tool management) to build a fully custom agent, integrated into your own application.

Is it Python-only?

This repository is the Python version; an equivalent SDK also exists in TypeScript for Node.js projects.