Skip to content

.NET: Add Google ChatClientAgent provider sample using with Gemini model - #2554

Merged
Roger Barreto (rogerbarreto) merged 5 commits into
microsoft:mainfrom
rogerbarreto:issues/1137-add-gemini-sample
Dec 1, 2025
Merged

.NET: Add Google ChatClientAgent provider sample using with Gemini model#2554
Roger Barreto (rogerbarreto) merged 5 commits into
microsoft:mainfrom
rogerbarreto:issues/1137-add-gemini-sample

Conversation

@rogerbarreto

Copy link
Copy Markdown
Member

Motivation and Context

CopilotAI review requested due to automatic review settings December 1, 2025 14:59
@markwallace-microsoftMark Wallace (markwallace-microsoft) added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs .NET Usage: [Issues, PRs], Target: .Net labels Dec 1, 2025
@github-actionsgithub-actionsBot changed the title .Net: Add Google ChatClientAgent provider sample using with Gemini model.NET: Add Google ChatClientAgent provider sample using with Gemini modelDec 1, 2025

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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 a comprehensive sample demonstrating how to create an AIAgent using Google Gemini models as the underlying inference service. The implementation addresses issue #1137.

Key changes:

  • Adds a new sample project demonstrating two different approaches to using Google Gemini models with ChatClientAgent
  • Includes temporary IChatClient wrapper implementations until the official Google.GenAI library incorporates Microsoft.Extensions.AI support
  • Configures package dependencies and adds the project to the solution

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
dotnet/samples/GettingStarted/AgentProviders/Agent_With_GoogleGemini/README.mdDocumentation explaining the sample, prerequisites, and the two different package options for Google Gemini integration
dotnet/samples/GettingStarted/AgentProviders/Agent_With_GoogleGemini/Program.csSample code demonstrating both the official Google.GenAI and community-driven Mscc.GenerativeAI.Microsoft implementations
dotnet/samples/GettingStarted/AgentProviders/Agent_With_GoogleGemini/GoogleGenAIExtensions.csExtension methods to convert Google.GenAI Client to IChatClient
dotnet/samples/GettingStarted/AgentProviders/Agent_With_GoogleGemini/GeminiChatClient.csInternal IChatClient implementation wrapping Google.GenAI functionality (temporary until official support)
dotnet/samples/GettingStarted/AgentProviders/Agent_With_GoogleGemini/Agent_With_GoogleGemini.csprojProject configuration with Google.GenAI and Mscc.GenerativeAI.Microsoft package references
dotnet/agent-framework-dotnet.slnxAdds the new sample project to the solution with alphabetical reordering of some existing projects
dotnet/Directory.Packages.propsAdds package version entries for Google.GenAI (0.6.0) and Mscc.GenerativeAI.Microsoft (2.9.3)

Aris Nguyen (arisng) pushed a commit to arisng/agent-framework that referenced this pull request Feb 2, 2026
…del (microsoft#2554)
* Add Gemini model sample
* Update Readme
* Address Comments
* Address format
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationUsage: [Issues, PRs], Target: documentation in the code base and learn docs.NETUsage: [Issues, PRs], Target: .Net

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.NET sample whatif it's NOT in Azure?

4 participants

@rogerbarreto@SergeyMenshykh@markwallace-microsoft