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.
Metadata
Release files for agent-framework-anthropic 1.0.0b260827
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agent_framework_anthropic-1.0.0b260827.tar.gz | 22.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agent_framework_anthropic-1.0.0b260827-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 46.6 kB
Release files / agent_framework_anthropic-1.0.0b260827.tar.gz
| Download URL | agent_framework_anthropic-1.0.0b260827.tar.gz |
|---|---|
| Size | 22.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1cbe4a8b8615554db1c58f67b94b5e83b9bdfecf75cbfa29046b7a49fc5bf0cb
|
|
BLAKE2b-256 checksum How to use checksums |
f6883f4a23df653a08eaec36cb6f1dfd87cca359435853bc3fdb1b1c32330d18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / agent_framework_anthropic-1.0.0b260827-py3-none-any.whl
| Download URL | agent_framework_anthropic-1.0.0b260827-py3-none-any.whl |
|---|---|
| Size | 24.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
92572c975d13cf00cd45c897a4d6963865861cec20858b3ea240d7dbb440ba94
|
|
BLAKE2b-256 checksum How to use checksums |
e1f15785aa0c2824f9b8b6cb6fc4f2918bc7aa6f7821f703b2da889e2e60649d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|