Skip to content

Conversation

@rogerbarreto
Copy link
Member

@rogerbarreto rogerbarreto commented Nov 20, 2025

Adding Anthropic AIAgent Support

Using offical Anthropic Package.

https://www.nuget.org/packages/Anthropic

  • Unit Tests
  • Integration Tests
  • Extensions
  • Samples

cc: @stephentoub

Copilot AI review requested due to automatic review settings November 20, 2025 21:40
@markwallace-microsoft markwallace-microsoft added documentation Improvements or additions to documentation .NET labels Nov 20, 2025
@github-actions github-actions bot changed the title .Net: Add Anthropic Agent Package .NET: Add Anthropic Agent Package Nov 20, 2025
Copilot finished reviewing on behalf of rogerbarreto November 20, 2025 21:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive support for Anthropic Claude models to the Microsoft Agent Framework, enabling developers to create AI agents using the official Anthropic SDK.

Key Changes:

  • Integration with Anthropic SDK via polyfill extensions (to be replaced once upstream PR merges)
  • Extension methods for creating agents from IAnthropicClient and IBetaService
  • Support for advanced features including reasoning/thinking capabilities and function tools

Reviewed Changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 27 comments.

Show a summary per file
File Description
dotnet/src/Microsoft.Agents.AI.Anthropic/Microsoft.Agents.AI.Anthropic.csproj New project file for Anthropic agent support package
dotnet/src/Microsoft.Agents.AI.Anthropic/AnthropicClientExtensions.cs Extension methods to create AI agents from IAnthropicClient
dotnet/src/Microsoft.Agents.AI.Anthropic/AnthropicBetaServiceExtensions.cs Extension methods to create AI agents from IBetaService
dotnet/src/Microsoft.Agents.AI.Anthropic/AnthropicClientJsonContext.cs JSON serialization context for Anthropic operations
dotnet/src/Microsoft.Agents.AI.Anthropic/External/AnthropicClientExtensions.cs Polyfill implementation for IChatClient support (temporary)
dotnet/src/Microsoft.Agents.AI.Anthropic/External/AnthropicBetaClientExtensions.cs Polyfill implementation for Beta service IChatClient support (temporary)
dotnet/tests/Microsoft.Agents.AI.Anthropic.UnitTests/Microsoft.Agents.AI.Anthropic.UnitTests.csproj Unit test project configuration
dotnet/tests/Microsoft.Agents.AI.Anthropic.UnitTests/Extensions/AnthropicClientExtensionsTests.cs Unit tests for IAnthropicClient extension methods
dotnet/tests/Microsoft.Agents.AI.Anthropic.UnitTests/Extensions/AnthropicBetaServiceExtensionsTests.cs Unit tests for IBetaService extension methods
dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletion.IntegrationTests.csproj Integration test project configuration
dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletionFixture.cs Test fixture supporting both regular and reasoning models
dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletionRunTests.cs Integration tests for agent runs
dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletionRunStreamingTests.cs Integration tests for streaming agent runs
dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletionChatClientAgentRunTests.cs Integration tests for ChatClientAgent runs
dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletionChatClientAgentRunStreamingTests.cs Integration tests for streaming ChatClientAgent runs
dotnet/src/Shared/IntegrationTests/AnthropicConfiguration.cs Configuration class for Anthropic integration tests
dotnet/samples/GettingStarted/README.md Updated to reference new Anthropic samples
dotnet/samples/GettingStarted/AgentWithAnthropic/README.md Documentation for Anthropic agent samples
dotnet/samples/GettingStarted/AgentWithAnthropic/Agent_Anthropic_Step01_Running/Program.cs Sample demonstrating basic Anthropic agent usage
dotnet/samples/GettingStarted/AgentWithAnthropic/Agent_Anthropic_Step02_Reasoning/Program.cs Sample demonstrating extended thinking/reasoning capabilities
dotnet/samples/GettingStarted/AgentWithAnthropic/Agent_Anthropic_Step03_UsingFunctionTools/Program.cs Sample demonstrating function tool integration
dotnet/samples/GettingStarted/AgentProviders/README.md Updated to reference new Anthropic provider sample
dotnet/samples/GettingStarted/AgentProviders/Agent_With_Anthropic/Program.cs Sample showing different deployment scenarios (Public API, Azure Foundry)
dotnet/samples/GettingStarted/AgentProviders/Agent_With_OpenAIChatCompletion/Program.cs Unrelated code accidentally added
dotnet/nuget.config Added local package source (developer-specific path)
dotnet/Directory.Packages.props Added Anthropic package references
dotnet/agent-framework-dotnet.slnx Added new projects to solution

@rogerbarreto rogerbarreto added this pull request to the merge queue Nov 25, 2025
Merged via the queue into microsoft:main with commit 1dde579 Nov 25, 2025
15 checks passed
@rogerbarreto rogerbarreto self-assigned this Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation .NET

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants