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.0b261112
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agent_framework_anthropic-1.0.0b261112.tar.gz | 29.7 kB | Without provenance | Details for agent_framework_anthropic-1.0.0b261112.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agent_framework_anthropic-1.0.0b261112-py3-none-any.whl | Python 3 | none | any | Details for agent_framework_anthropic-1.0.0b261112-py3-none-any.whl |
Total release size: 61.9 kB
Release files / agent_framework_anthropic-1.0.0b261112.tar.gz
| Download URL | agent_framework_anthropic-1.0.0b261112.tar.gz |
|---|---|
| Size | 29.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a4c1719d0d852fef210cb22632a297edf0b2866ae5ee9fe8bf2f2aab543058f8
|
|
BLAKE2b-256 checksum How to use checksums |
832b45e65852273e7458feb6e9ff252ad2ed135a6d858f0199727b62532dce5b
|
| 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.0b261112-py3-none-any.whl
| Download URL | agent_framework_anthropic-1.0.0b261112-py3-none-any.whl |
|---|---|
| Size | 32.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
44403e124ef70b28982ac76ebe34324db41198450d38068aee77fb6a485e2336
|
|
BLAKE2b-256 checksum How to use checksums |
cb91022925268219872aedbfa0b06465f79257ff72990424ec0847070bf71ab5
|
| 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.0b261112
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.