Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Get Started with Microsoft Agent Framework Anthropic

Please install this package via pip:

pip install agent-framework-anthropic --pre

Anthropic Integration

The Anthropic integration enables communication with the Anthropic API, allowing your Agent Framework applications to leverage Anthropic's capabilities.

The package also includes Anthropic-hosted transport wrappers for:

  • Microsoft Foundry via AnthropicFoundryClient
  • Amazon Bedrock via AnthropicBedrockClient
  • Google Vertex AI via AnthropicVertexClient

Basic Usage Example

See the Anthropic agent examples which demonstrate:

  • Connecting to a Anthropic endpoint with an agent
  • Streaming and non-streaming responses

Structured system blocks for prompt caching

Use instructions with Anthropic-native system blocks when you need structured system prompt content, such as prompt-cache cache_control metadata. Do not combine structured instructions blocks with a leading system message.

from anthropic.types.beta import BetaTextBlockParam

from agent_framework_anthropic import AnthropicClient

client = AnthropicClient()
system_blocks: list[BetaTextBlockParam] = [
    {"type": "text", "text": "Stable instructions", "cache_control": {"type": "ephemeral", "ttl": "1h"}},
]

response = await client.get_response("Hello", options={"instructions": system_blocks})

Instructions contributed later in a run — by a context provider such as SkillsProvider, or by per-run options — are appended as an additional text block after the configured blocks. The blocks you supply keep their structure and their position, so a cache_control breakpoint stays valid.

Persisted server-tool history

Anthropic server-tool calls and results use Content.additional_properties["anthropic"]["server_tool_block"] internally to preserve the native block type, structured result content, and optional caller metadata across message serialization. Result metadata can contain provider-encrypted fields such as encrypted_content; the adapter stores those plain serialized values unchanged because Anthropic requires them for replay. Applications should treat this namespace as adapter-owned replay data and must not modify it.

Paused server-tool turns

When Anthropic returns pause_turn, the client automatically replays the paused assistant content with the same tools when every content block can be reconstructed faithfully. It performs at most 10 continuation requests. If the paused response contains unsupported native tool content, includes a native block dropped during parsing (such as redacted reasoning), contains a streamed MCP call whose argument deltas are not retained, or remains paused after that limit, the response retains finish_reason="pause_turn" so the caller can decide whether to continue later.

Metadata

Release files for agent-framework-anthropic 1.0.0b261030

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-framework-anthropic 1.0.0b261030
File Size Uploaded Provenance Actions
agent_framework_anthropic-1.0.0b261030.tar.gz 27.4 kB Without provenance Details for agent_framework_anthropic-1.0.0b261030.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agent-framework-anthropic 1.0.0b261030
File Interpreter ABI Platform Actions
agent_framework_anthropic-1.0.0b261030-py3-none-any.whl Python 3 none any Details for agent_framework_anthropic-1.0.0b261030-py3-none-any.whl

Total release size: 57.4 kB

Release files / agent_framework_anthropic-1.0.0b261030.tar.gz

Download URL agent_framework_anthropic-1.0.0b261030.tar.gz
Size 27.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d7a5d395210201652ce31d50fa8348c1ccf525a9414c4ea6806d39db4059ea94
BLAKE2b-256 checksum
How to use checksums
6c487209b9092068b0210105de489d6cd91e09ab1f1b6508d03c1f0cfbd896cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / agent_framework_anthropic-1.0.0b261030-py3-none-any.whl

Download URL agent_framework_anthropic-1.0.0b261030-py3-none-any.whl
Size 30.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d97a45ad27eee1f84d6f3d351662324cf13296b055e69da2cd9d1b585011ad9
BLAKE2b-256 checksum
How to use checksums
912369714a167bc4e9f30e7e73f9b49b2a9e8ef784881ce45ff031227384a12b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Security for agent-framework-anthropic 1.0.0b261030

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page