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.0b261106

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.0b261106
File Size Uploaded Provenance Actions
agent_framework_anthropic-1.0.0b261106.tar.gz 29.7 kB Without provenance Details for agent_framework_anthropic-1.0.0b261106.tar.gz

Built distribution (wheel)

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

Total release size: 61.9 kB

Release files / agent_framework_anthropic-1.0.0b261106.tar.gz

Download URL agent_framework_anthropic-1.0.0b261106.tar.gz
Size 29.7 kB
Tags Source
SHA-256 checksum
How to use checksums
cb38dfd5a68e5256e0c934a605ccf437fdd5574167273c76b3126b57bfe39d21
BLAKE2b-256 checksum
How to use checksums
b49511853d8b90d231fec82342c8a23cabe2fa907a72a5fa1fbb92993503d711
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.0b261106-py3-none-any.whl

Download URL agent_framework_anthropic-1.0.0b261106-py3-none-any.whl
Size 32.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9b53678334bf6b3c60ba6251abda1b0d69161c5ef98ee671346e566127c4d89
BLAKE2b-256 checksum
How to use checksums
410f93b4ec6f45c71dc9d2d99b2220db6c718a67e3a769fb799054fca39c4baf
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.0b261106

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