anthropics/claude-agent-sdk-python repo
Official Anthropic Python SDK for building agents that run on Claude Code. Ships structured outputs (agents return validated JSON matching a schema), automatic fallback model handling, a ResultMessage terminal_reason field (shows exactly why the agent loop ended), typed model_usage as dict[str, ModelUsage], SDK beta feature flags including the 1M context window beta, and build scripts hardened against command injection via version validation. Claude Code is bundled in the package by default. Active v0.2.x release track. Apache-2.0 license. 7,700 stars, 1,200 forks.
What it does for you: This is the sanctioned Python path for building Hermes agents that run Claude Code headlessly, replacing ad-hoc CLI subprocess calls with a typed, versioned SDK contract. Structured outputs eliminate the JSON parsing layer that currently sits between Hermes and every tool result it expects to be machine-readable. The terminal_reason field surfaces the exact cause when an agent loop exits early, making debugging silent Hermes failures orders of magnitude faster than reading raw logs.
In practice: 7,700 stars and 1,200 forks for the official Anthropic agent SDK is strong adoption. The feature set matches what a production Hermes pipeline needs: typed outputs, fallback model safety, and observable loop termination. The hardened build scripts are a meaningful supply-chain hygiene signal from the Anthropic team. First appearance in this newsletter despite being the foundation-level SDK for the Axion agent stack.
For: Both runtimes. Official Anthropic Python Agent SDK callable from Axion scripts, Hermes agent loops, and Claude Code sessions.
Verdict: build now. NEW. First appearance in this newsletter. 7,700 stars, 1,200 forks, Apache-2.0. Official Anthropic Python Agent SDK: structured outputs, typed model_usage, terminal_reason, fallback model, command-injection-hardened build scripts. This is the correct foundation for all new Hermes agent builds and should replace any ad-hoc Claude CLI subprocess integration currently in Axion.
Build #1 anthropics/claude-agent-sdk-python: use the ai-implementation-build-intake skill to build this safely. Source: https://github.com/anthropics/claude-agent-sdk-python. Save canonical skill/agent under AXION\Skills and AXION\Agents.
Source · 7,700 stars, 1,200 forks confirmed from GitHub search results on 2026-08-13. Active v0.2.x release series. Features: structured outputs, fallback model, terminal_reason, model_usage TypedDict, SDK beta flags including 1M context window, build scripts hardened with version validation. Apache-2.0 license. Official Anthropic-maintained repository.