claude-agent-sdk-python

A Python SDK that enables applications to interact with Claude Code via an async query API and an interactive ClaudeSDKClient. It supports tool use, including in-process custom tools exposed through MCP servers, and hook-based control of the agent loop.

Evaluated Mar 29, 2026 (0d ago)
Repo ↗ Ai Ml ai-ml devtools python agent-sdk mcp tool-calling streaming asyncio
⚙ Agent Friendliness
66
/ 100
Can an agent use this?
🔒 Security
51
/ 100
Is it safe for agents?
⚡ Reliability
41
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
78
Documentation
80
Error Messages
--
Auth Simplicity
55
Rate Limits
10

🔒 Security

TLS Enforcement
40
Auth Strength
35
Scope Granularity
65
Dep. Hygiene
70
Secret Handling
55

Tool control is supported via allow/disallow lists and hook-based permission decisions, which can reduce risky tool execution. However, explicit authentication/credential handling, transport security expectations (beyond implied CLI behavior), rate limiting, and secret handling/logging practices are not documented in the provided content. Dependency hygiene is unknown from supplied info; only dependency names/versions are visible in the manifest.

⚡ Reliability

Uptime/SLA
0
Version Stability
60
Breaking Changes
55
Error Recovery
50
AF Security Reliability

Best When

You want to integrate Claude Code agent capabilities directly into a Python application with async streaming, optional in-process tools, and programmatic control (allowed/disallowed tools, hooks, working directory).

Avoid When

You need a network-only, vendor-hosted API with clear HTTP auth and rate-limit semantics, or you cannot tolerate reliance on the bundled Claude Code CLI binary.

Use Cases

  • Embedding Claude Code-style agent interactions into Python apps
  • Streaming/iterating over assistant messages asynchronously
  • Providing custom callable tools to an agent via in-process MCP servers
  • Deny/allow tool execution using hooks (e.g., block certain bash commands)
  • Running agent sessions against a specified working directory/project

Not For

  • Simple request/response HTTP API integrations (this is primarily an SDK for running Claude Code behavior locally via bundled CLI)
  • Environments where subprocess/CLI bundling is disallowed (the SDK bundles/uses the Claude Code CLI)
  • Use cases requiring a documented, standalone REST/OpenAPI interface

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
Yes
SDK
Yes
Webhooks
No

Authentication

Methods: Implicit/local CLI-based authentication (not specified in README) Tool permission allowlists/denylists and hook-based permission decisions
OAuth: No Scopes: No

The README focuses on tool permissions (allowed_tools/disallowed_tools/permission_mode) rather than user authentication. It indicates the bundled Claude Code CLI is used by default, implying any credential handling is likely delegated to that CLI, but explicit mechanisms are not documented here.

Pricing

Free tier: No
Requires CC: No

No pricing details are provided in the README or manifest content supplied.

Agent Metadata

Pagination
none
Idempotent
False
Retry Guidance
Not documented

Known Gotchas

  • Tool availability vs. tool execution: allowed_tools pre-approves but does not remove tools from Claude's toolset (permission_mode/can_use_tool logic still matters).
  • Non-determinism from agent loop: even with hooks, results may vary across runs.
  • CLI bundling/installation expectations: runtime behavior depends on the bundled Claude Code CLI being present/compatible.

Alternatives

Full Evaluation Report

Comprehensive deep-dive: security analysis, reliability audit, agent experience review, cost modeling, competitive positioning, and improvement roadmap for claude-agent-sdk-python.

AI-powered analysis · PDF + markdown · Delivered within 30 minutes

$99

Package Brief

Quick verdict, integration guide, cost projections, gotchas with workarounds, and alternatives comparison.

Delivered within 10 minutes

$3

Score Monitoring

Get alerted when this package's AF, security, or reliability scores change significantly. Stay ahead of regressions.

Continuous monitoring

$3/mo

Scores are editorial opinions as of 2026-03-29.

5347
Packages Evaluated
21056
Need Evaluation
586
Need Re-evaluation
Community Powered