Files
agent-framework/python/samples/getting_started/agents/anthropic/README.md
T
Eduard van Valkenburg 12d17acdc0 Python: Introducing the Anthropic Client (#1819)
* initial version of anthropic connector

* updated implementation and added tests

* fix type and readme

* mypy fix and int tests enabled

* add integration test setup

* updated based on comments

* improved function result handling

* added extra unordered test

* updated from review

* fix tool choice handling

* same fix for chat client
2025-11-03 19:32:28 +00:00

806 B

Anthropic Examples

This folder contains examples demonstrating how to use Anthropic's Claude models with the Agent Framework.

Examples

File Description
anthropic_basic.py Demonstrates how to setup a simple agent using the AnthropicClient, with both streaming and non-streaming responses.
anthropic_advanced.py Shows advanced usage of the AnthropicClient, including hosted tools and thinking.

Environment Variables

Set the following environment variables before running the examples:

  • ANTHROPIC_API_KEY: Your Anthropic API key (get one from Anthropic Console)
  • ANTHROPIC_MODEL: The Claude model to use (e.g., claude-haiku-4-5, claude-sonnet-4-5-20250929)