Most LLM SDKs focus on simple request/response — this SDK treats the assistant as a full agent loop you embed inside Python apps. It surfaces streaming async queries, first-class tool integration (including in-process MCP servers), permission hooks, and session management so you can run interactive, tool-enabled Claude agents from standard Python environments.
What Sets It Apart
- First-class agent primitives: exposes an async query() iterator and a ClaudeSDKClient for bidirectional interactive sessions, making streaming, stepwise agent outputs easy to consume in long-running apps — so you can build UIs or automation that react to partial results.
- In-process MCP servers for custom tools: lets you register Python functions as MCP servers that run in the same process (no subprocess/IPC), reducing latency and simplifying deployment and debugging compared with external tool servers.
- Tool permission model and hooks: includes an allowlist/denylist plus hook points (PreToolUse, etc.) so applications can inspect or veto tool calls programmatically — important for safety, auditing, and predictable automation behavior.
- Packaging and CLI ergonomics: the package bundles a Claude Code CLI by default and provides release workflows to publish PyPI wheels with a bundled CLI version, simplifying reproducible installs across platforms.
Who It's For
Great fit if you: are integrating Claude agents into Python backends or developer tooling; need streaming/interactive agent behavior; want to expose custom Python functions as agent-invokable tools with low latency; or require programmatic permission controls and hooks for safety/automation.
Look elsewhere if you: only need simple stateless text-completion calls (a lightweight REST client may suffice); must run entirely offline with local LLMs (this SDK expects Claude/Claude Code workflows); or need a full end-user chat UI — the SDK focuses on developer-facing agent primitives rather than shipping a complete UI.
Where It Fits
Compared with generic LLM client libraries, this SDK is agent-first: it implements tool invocation patterns, session forking/subagents, and hooks that are typical when turning an LLM into a controlled automation actor. If your product is built around Claude/Claude Code and Python, this is the pragmatic integration path; if you need cross-provider parity (OpenAI/Gemini/etc.) you may layer a provider abstraction on top but lose some Claude-specific features.
