Back to Explore

anthropics/anthropic-sdk-python

GitHub
31 updates · last 90 days1 watchersOpen source

Last release:

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: Yes, the repo shows recent upstream pushes (latest upstream push on 2026-07-28) and multiple SDK updates released in late July 2026.
  • Apparent update cadence: Fast and ongoing. Updates cluster in the span of about a month (for example, v0.115.0 on 2026-06-30, v0.116.0 on 2026-07-02, v0.117.x starting 2026-07-16, then v0.118.0 to v0.120.2 from 2026-07-22 to 2026-07-28), suggesting roughly weekly to more frequent changes during this period.

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v0.120.2

    Release v0.120.2 adds compatibility for MCP SDK v2 while maintaining support for MCP SDK v1. The main code change introduces a field-name compatibility layer (camelCase to snake_case) so tool schemas, MIME types, and call results map correctly across MCP versions.

  • v0.120.1

    v0.120.1 is a small patch release that primarily updates the SDK package version metadata and narrows the MCP extra dependency constraint. The only user-facing change in the diff is related to how the optional `mcp` extra resolves versions of the `mcp` dependency.

  • v0.120.0

    v0.120.0 adds support for the claude-opus-5 model and introduces mid-conversation tool addition and removal blocks (along with tool_change related plumbing). It also expands the beta fallback credit behavior on the client side, including adding a server-side "default" option for fallbacks. The release notes cover these headline items, but the code diff contains several additional behavioral and request-shape changes that are not explicitly documented.

    Features
  • v0.119.0

    v0.119.0 adds a new stop reason, `model_context_window_exceeded`, and updates the agent toolset to handle binary files when using the read/edit tooling. The code diff also reveals additional, more detailed changes to binary file handling behavior and configuration that are not fully covered by the release notes.

    BreakingFeatures
  • v0.118.0

    v0.118.0 adds Managed Agents support for configuring model effort, sending initial session events at session creation, and streaming thread event deltas. The release also includes a number of newly generated beta type models for effort levels and additional webhook event payloads.

    Features
  • v0.117.1

    v0.117.1 primarily updates the SDK’s typed refusal metadata and fixes AWS client behavior around credentials handling. It also bumps and constrains a couple of HTTP-related development/runtime dependencies (notably http-snapshot and httpx_aiohttp).

    Features
  • v0.117.0

    v0.117.0 adds new beta API support for “dreaming” and introduces support for MCP Tunnels. It also includes a credentials-focused fix intended to prevent credential material from appearing in traceback frame locals. The code diff reveals additional substantial functionality beyond what is described in the release notes.

    SecurityFeatures
  • v0.116.0

    v0.116.0 introduces support for the new beta header value agent-memory-2026-07-22 across beta memory store endpoints. In the code, this beta header default is swapped in where the previous managed-agents-2026-04-01 value was used.

    Features
  • v0.115.1

    v0.115.1 primarily changes the SDK surface area for beta/webhook-related types and a few other parameter and schema details. The release notes only mention removing nonfunctional types, but the code diff shows several breaking changes to exported types and request/response typing.

  • v0.115.0

    v0.115.0 adds Managed Agents “event delta” streaming (event_start and event_delta), along with agent overrides and reverse pagination support. It also expands beta webhook event typing to include additional event categories related to agents and deployments. Several new beta types and streaming helpers were added to support these capabilities.

    Features
  • v0.114.0

    v0.114.0 adds support for the new model string "claude-sonnet-5" across the typed model parameters used by the SDK. It also adjusts agent file tool path resolution to permit absolute paths when, after canonicalization, they resolve inside the configured workdir. No other breaking API surface changes are evident from the provided diff.

    Features
  • v0.113.0

    v0.113.0 adds new tool parameter types for the 20260318 web_fetch and web_search variants, and wires them into the SDK's exported type unions. It also updates the Messages token counting APIs to accept a user profile ID header, and includes a fix for an async count_tokens output_format/output_config merge issue.

    Features
  • v0.112.0

    v0.112.0 adds support for streaming `system.message` events, improves the local filesystem memory tool's directory creation security, and extends policy refusal categories. It also adds support for sending a user profile ID via the `anthropic-user-profile-id` request header across message and message batch APIs.

    SecurityFeatures
  • v0.111.0

    Release v0.111.0 adds helper telemetry tagging to the BetaRefusalFallbackMiddleware flow. Specifically, requests involved in client-side refusal fallbacks are now tagged with the x-stainless-helper value fallback-refusal-middleware (including across the primary and fallback hop).

    Features
  • v0.110.0

    v0.110.0 primarily introduces support for an additional code execution tool version (documented: code_execution_20260120). The release also includes several telemetry and header-merging correctness fixes around the x-stainless-helper header handling. Code changes additionally introduce new beta fallback schema elements and a newer code execution tool version that are not mentioned in the release notes.

    Features
  • v0.109.2

    Release v0.109.2 updates the SDK’s generated model type unions and version metadata. The only functional change visible in the diff is the removal of specific retired model identifiers from the SDK’s allowed model values.

    Breaking
  • v0.109.1

    Release 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

    v0.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.

    Features
  • v0.108.0

    v0.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.

    Features
  • v0.107.1

    Release 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.