Files
agent-framework/python/packages/anthropic
T
Ao Chen 6e3bc219e0 fix(anthropic): fix duplicate ToolCallStartEvent in streaming tool calls (#3051)
When processing `input_json_delta` events, the Anthropic client was
passing the tool name from the previous `tool_use` event. This caused
ag-ui's `_handle_function_call_content` to emit a `ToolCallStartEvent`
for every streaming chunk (since it triggers on `if content.name:`).

This fix changes the behavior to pass an empty string for `name` in
`input_json_delta` events, matching OpenAI's behavior where streaming
argument chunks have `name=""`. The initial `tool_use` event still
provides the tool name, so only one `ToolCallStartEvent` is emitted.

Co-authored-by: Evan Mattson <35585003+moonbox3@users.noreply.github.com>
6e3bc219e0 ยท 2026-01-12 08:14:49 +00:00
History
..

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.

Basic Usage Example

See the Anthropic agent examples which demonstrate:

  • Connecting to a Anthropic endpoint with an agent
  • Streaming and non-streaming responses