Skip to main content
ClaudeWave
EN, English
anthropics / Subagents

claude-agent-sdk-python

  • 8.3k stars
  • 1.4k forks
  • 579 open issues
  • Language: Python
  • License: MIT
  • updated

Install

Terminal
git clone https://github.com/anthropics/claude-agent-sdk-python && cp claude-agent-sdk-python/*.md ~/.claude/agents/
  1. Clone the repository and copy the agent .md definitions into ~/.claude/agents (or .claude/agents inside a project).
  2. Start a new Claude Code session to load the agents.
  3. Delegate work to them with the Task/Agent tool or by name.

Editor's note

The Claude Agent SDK for Python is an official Anthropic library that lets developers drive Claude Code programmatically from Python applications. The core interface is a `query()` async function that returns an `AsyncIterator` of typed response messages, including `AssistantMessage` and `TextBlock` objects, while `ClaudeSDKClient` adds support for multi-turn interactive sessions, custom tools, and hooks. Custom tools are defined with a `@tool` decorator and run as in-process MCP servers via `create_sdk_mcp_server()`, which avoids the subprocess overhead and IPC latency of traditional external MCP servers. Tool permissions are managed through `allowed_tools`, `disallowed_tools`, and a `permission_mode` option such as `acceptEdits`. Hooks let developers intercept specific points in the Claude Code agent loop for deterministic processing. The package bundles the Claude Code CLI automatically, requiring no separate installation. Python developers building autonomous coding agents, CI pipelines, or any workflow that orchestrates file reads, writes, and shell commands through Claude Code are the primary audience.

README

Subagents overview

README preview not available. Visit the repo on GitHub for full documentation.
Frequently asked

What people ask about claude-agent-sdk-python

What is anthropics/claude-agent-sdk-python?

anthropics/claude-agent-sdk-python is subagents for the Claude AI ecosystem with 8.3k GitHub stars.

How do I install claude-agent-sdk-python?

You can install claude-agent-sdk-python by cloning the repository (https://github.com/anthropics/claude-agent-sdk-python) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.

Is anthropics/claude-agent-sdk-python safe to use?

Our security agent has analyzed anthropics/claude-agent-sdk-python and assigned a Trust Score of 99/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.

Who maintains anthropics/claude-agent-sdk-python?

anthropics/claude-agent-sdk-python is maintained by anthropics. The last recorded GitHub activity is dated 2026-10-22, with 579 open issues.

Are there alternatives to claude-agent-sdk-python?

Yes. On ClaudeWave you can browse similar subagents at /categories/agents, sorted by popularity or recent activity.