anthropics/anthropic-sdk-python
Last release: 2026-06-09
Claude SDK for Python, which lets Python applications access the Claude API. It includes installation via pip and example code for creating messages and calling Claude models, with full API SDK documentation available on platform.claude.com.
Project status
- Actively maintained: GitHub activity is very recent (last upstream push was 2026-06-09), and there are multiple back-to-back updates in the last few days (v0.109.1, v0.109.0, v0.108.0, v0.107.1, v0.107.0).
- Apparent update cadence: Roughly daily to every few days during 2026-06-05 to 2026-06-09, with ongoing smaller adjustments, suggesting steady development rather than a long quiet period.
AI summary generated 2026-06-11
Recent updates
v0.109.1
2026-06-09Release v0.109.1 primarily updates refusal metadata types to include a new refusal category, frontier_llm. The rest of the diff is versioning and regenerated OpenAPI-spec related metadata, with no other functional code changes shown.
v0.109.0
2026-06-09v0.109.0 adds initial client-side support for Managed Agents deployments, including new beta API resource surfaces for working with deployments. It also introduces additional credential handling via environment variable credentials (as stated in the release notes) and ships a large set of generated beta types for deployment, scheduling, events, and run error handling.
Featuresv0.108.0
2026-06-09v0.108.0 adds support for the new models claude-mythos-5 and claude-fable-5. It also introduces server-side fallbacks on refusal, plus a corresponding client-side fallbacks middleware that can retry declined requests along a fallback chain.
Featuresv0.107.1
2026-06-07Release v0.107.1 is a small bug fix focused on Anthropic Foundry authentication headers. It ensures that when using Foundry API key auth, requests include the expected `x-api-key` header in addition to the existing `api-key` header.
v0.107.0
2026-06-06v0.107.0 primarily updates beta Managed Agents related type definitions, with some docstring-level clarification and additional fields in various beta tool and webhook schemas. The release notes mention only a general “small updates to Managed Agents types”, but the code diff shows multiple concrete schema changes that are not called out.
BreakingFeaturesv0.106.0
2026-06-05v0.106.0 updates the SDK by deprecating Claude Opus 4.1 and improving schema transformation for $ref schemas with sibling $defs. It also fixes Foundry client copy/with_options behavior and adjusts Foundry auth header handling to prevent leaking Anthropic API keys to Foundry endpoints.
Featuresv0.105.2
2026-05-29Release v0.105.2 does not include any described feature, bug fix, or behavioral change in the provided release notes. The changelog content is limited to a version bump, while the code diff shows only version metadata updates and a small change to the release GitHub Actions workflow permissions.
v0.105.1
2026-05-29Release v0.105.1 primarily bumps the package version and updates internal release automation for publishing to PyPI. The only functional change reflected in the diff is CI/CD workflow logic related to Trusted Publishing, including removing explicit PYPI token wiring and adjusting the publish script behavior.
v0.105.0
2026-05-28v0.105.0 adds new API support for the claude-opus-4-8 model, introduces mid-conversation system instruction blocks, and exposes a new usage breakdown field output_tokens_details. The diff is largely additive, focused on new/optional typed fields and new type exports.
Featuresv0.104.1
2026-05-22v0.104.1 is a small streaming bug fix release. It ensures encrypted compaction metadata is preserved and emitted correctly through the beta streaming compaction event pipeline.
v0.104.0
2026-05-21Version 0.104.0 adds support for the `thinking-token-count-2026-05-13` beta to expose estimated token progress for streaming `thinking` block deltas. The Python SDK update is primarily a schema addition, introducing a new `estimated_tokens` field on the relevant delta type.
Featuresv0.103.1
2026-05-19v0.103.1 updates SessionToolRunner to support split-client “partial fulfilment” behavior when a session includes tool calls owned by a different client. Instead of posting an error for unowned tools, the runner now yields a dispatch record but posts no result, leaving the tool_use_id pending for the owning client.
Breakingv0.103.0
2026-05-19Release v0.103.0 adds support for self-hosted sandboxes in CMA via new client-side sandbox helpers. The diff is dominated by generated type changes for self-hosted environment configuration and new managed-agents session events and tool input schemas.
Featuresv0.102.0
2026-05-13v0.102.0 extends the SDK with new beta API surface area for prompt-cache diagnostics, adding request-level diagnostics input and response-level diagnostics output. It also adds new beta managed agents types related to web search results. Most changes appear additive (new optional fields and new generated types).
Featuresv0.101.0
2026-05-11v0.101.0 mainly updates the package version and makes small correctness and developer-experience tweaks. The release notes also claim a new AWS client feature, but the provided code diff only shows a formatting fix, version bumps, and example script updates.
Featuresv0.100.0
2026-05-06v0.100.0 adds new beta API support around Managed Agents, including multiagent coordinator topology and per-outcome evaluation state, plus webhook and vault validation related types. It also includes a small webhook configuration adjustment. The code diff is dominated by newly generated beta type models and exports, with very few deletions.
Featuresv0.99.0
2026-05-05v0.99.0 adds support for targeting a specific workspace during OIDC federation token exchange, driven by a new ANTHROPIC_WORKSPACE_ID environment variable and corresponding config/workload credentials support. The code also improves 401 error messaging for token exchange failures by adding a diagnostic hint path when workspace selection may be the cause.
BreakingFeaturesv0.98.1
2026-05-04Release v0.98.1 mainly updates version metadata and makes a small correction in an example configuration. The release notes describe a chores change, specifically a typo fix in the example.
v0.98.0
2026-05-04v0.98.0 focuses on improving the Beta Managed Agents APIs and adding new client authentication capabilities (workload identity federation, interactive OAuth, and auth profiles). The release also includes smaller bug fixes for streaming metadata and multipart form field naming, plus internal project housekeeping.
Featuresv0.97.0
2026-04-23v0.97.0 introduces support for CMA Memory in public beta, adding new beta-only request/response types related to memory stores and managed agent memory store resources. It also includes a client-side performance optimization for multipart requests and a couple of API spec related fixes.
Features