Skip to content
Agentmart
Submit a tool

Claude Agent SDK (Python)

Python SDK that runs the Claude Code agent loop inside your own program, with custom tools and hooks written as Python functions.

Harness by Anthropic

IndexedMIT★ 8,342
Write a review

Install

From the package registry. Read the repository before you give any tool access to your data.

pip install claude-agent-sdk

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

The package bundles the Claude Code CLI, so a Python program can send a prompt to the agent and iterate over the messages it returns. A query function handles single requests, and a client class adds interactive conversations, custom tools defined as Python functions, and hooks. Options control the system prompt, working directory, allowed and disallowed tools, and permission mode.

Use cases: code-generation, agent-orchestration

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Fact sheet

Languages
PythonREADME
Packages
claude-agent-sdk (pypi)README
MCP support
Built inREADME
Streaming
YesREADME
Memory
short-termREADME
Model providers
anthropicREADME
Maturity
Betagithub.com

Facts extracted by Claude Haiku 5.5 from the linked sources on Oct 24, 2026; reviewed Oct 24, 2026. Wrong fact? Tell us.

Alternatives

Frameworks for the same language with a similar way of orchestrating agents.

Compare and alternatives

Featured in

Signals

Stars
8,342
Forks
1,373
Open issues
229
Weekly downloads
7,924,764
Last commit
Oct 24, 2026 (3 days ago)
Last release
Oct 24, 2026 (3 days ago)
Last package publish
Oct 24, 2026 (3 days ago)

From GitHub (fetched Oct 24, 2026) and the package registry.

Details

Packages
pypi claude-agent-sdk
License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Anthropic

Cite this page

Claude Agent SDK (Python). Agent Mart. https://agentmart.dev/harnesses/claude-agent-sdk-python (last updated 2026-10-24)