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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_framework_anthropic-1.0.0b260821.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file agent_framework_anthropic-1.0.0b260821.tar.gz.

File metadata

  • Download URL: agent_framework_anthropic-1.0.0b260821.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","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}

File hashes

Hashes for agent_framework_anthropic-1.0.0b260821.tar.gz
Algorithm Hash digest
SHA256 7bd0903523266e703ec938d6cbc75a33cf8a55da09a21584a6848882d08b5f62
MD5 dde86533ca602e7d87803b4036ef01f8
BLAKE2b-256 7f70070fec583e97de146f3ea82526f69b01ffacb2a25a6e5b062ebec70f754e

See more details on using hashes here.

File details

Details for the file agent_framework_anthropic-1.0.0b260821-py3-none-any.whl.

File metadata

  • Download URL: agent_framework_anthropic-1.0.0b260821-py3-none-any.whl
  • Upload date:
  • Size: 24.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","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}

File hashes

Hashes for agent_framework_anthropic-1.0.0b260821-py3-none-any.whl
Algorithm Hash digest
SHA256 6b8d1dafc152c14ff83955e5bb089b8f4c859fe01c47033085a511b7fe9255ef
MD5 1cec3da5b5f97fc60cd08b1d5e1601e9
BLAKE2b-256 ee18afe3b456be6bbbfe1c5a84a02e43ff223566bc8cf60a157f96f8da0a1ded

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0b260821 This release

2 files

0.0.0a1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page