Registry / llm-agents / agent-framework-claude

agent-framework-claude

JSON →
library1.0.0b260409pypypiunverified

The `agent-framework-claude` library provides an integration for using Anthropic's Claude models within Microsoft's Agent Framework. Currently in beta version `1.0.0b260409`, it is part of an actively developed monorepo (`microsoft/agentframework`) with frequent pre-releases, indicating potential for rapid changes and feature updates.

llm-agentsai-mlazure
pip install agent-framework-claude
Install & Compatibility
Where this runs
tested against v1.0.0b260609 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 9.65s
py 3.11
✓ —
✓ 8.4s
py 3.12
✓ —
✓ 7.25s
py 3.13
✓ —
✓ 7.33s
py 3.9
✕ build_error
✕ build_error
181MB installed
● package 181MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ClaudeAgent
from agentframework.integrations.claude import ClaudeAgent
from agent_framework_claude import ClaudeAgent
The library is part of the 'agentframework' monorepo, so its module path is nested under `agentframework.integrations`.

This quickstart initializes a `ClaudeAgent` and demonstrates a simple asynchronous interaction. Ensure your `ANTHROPIC_API_KEY` is set as an environment variable or passed directly. The `model` parameter is recommended for explicit control.

import os import asyncio from agentframework.integrations.claude import ClaudeAgent async def main(): # Ensure ANTHROPIC_API_KEY is set in your environment anthropic_api_key = os.environ.get('ANTHROPIC_API_KEY', '') if not anthropic_api_key: print("Warning: ANTHROPIC_API_KEY environment variable not set. Agent may not function.") agent = ClaudeAgent( name="Claude", description="An agent that uses Claude for general purpose reasoning.", anthropic_api_key=anthropic_api_key, model="claude-3-opus-20240229" # Specify your desired Claude model ) # Example interaction response = await agent.invoke("What is the capital of France?") print(f"Claude's response: {response}") if __name__ == '__main__': asyncio.run(main())
Debug
Known issues
breakingAs a beta package (`1.0.0b...`), `agent-framework-claude` is subject to frequent breaking changes without major version bumps. API signatures, class names, or core functionalities may change between minor pre-release versions.
fix
Always pin to specific versions (e.g., `agent-framework-claude==1.0.0b260409`) and consult the latest GitHub documentation for updates.
affects: All `1.0.0bX` pre-release versions
gotchaThe `ClaudeAgent` constructor requires an `anthropic_api_key`. If this is not provided, or if the `ANTHROPIC_API_KEY` environment variable is not set, API calls will fail with authentication errors.
fix
Ensure `os.environ['ANTHROPIC_API_KEY']` is set, or pass `anthropic_api_key='YOUR_API_KEY'` directly to the `ClaudeAgent` constructor.
affects: All versions
gotchaThe library is built on `asyncio`. All interactions with the agent (e.g., `agent.invoke()`) are asynchronous and must be `await`ed within an `async` function. Calling them directly will result in a `coroutine object` being returned, not the actual result.
fix
Wrap your agent interactions in `async def` functions and use `await`. Run your main async function using `asyncio.run(main())`.
affects: All versions
Upgrade
Version history
1.0.0b260609latest on PyPI
Audit
Dependencies
agentframework-corerequiredThis package is an integration layer built on top of the core Agent Framework.
anthropicrequiredRequired for interacting with the Anthropic Claude API.
Agent activity
102 hits · last 30 days
node
8
petalbot
5
claudebot
4
mj12bot
3
ahrefsbot
3
amazonbot
2
bytedance
1
Resources