Skip to content

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

Merged
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
rogerbarreto merged 5 commits into
microsoft:mainfrom
rogerbarreto:issues/1137-add-gemini-sample

Conversation

@rogerbarreto

Copy link
Copy Markdown
Member

Motivation and Context

Copilot AI review requested due to automatic review settings December 1, 2025 14:59
@markwallace-microsoft 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-actions github-actions Bot changed the title .Net: Add Google ChatClientAgent provider sample using with Gemini model .NET: Add Google ChatClientAgent provider sample using with Gemini model Dec 1, 2025
Comment thread dotnet/samples/GettingStarted/AgentProviders/Agent_With_GoogleGemini/README.md Outdated

Copilot AI 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
File Description
dotnet/samples/GettingStarted/AgentProviders/Agent_With_GoogleGemini/README.md Documentation explaining the sample, prerequisites, and the two different package options for Google Gemini integration
dotnet/samples/GettingStarted/AgentProviders/Agent_With_GoogleGemini/Program.cs Sample code demonstrating both the official Google.GenAI and community-driven Mscc.GenerativeAI.Microsoft implementations
dotnet/samples/GettingStarted/AgentProviders/Agent_With_GoogleGemini/GoogleGenAIExtensions.cs Extension methods to convert Google.GenAI Client to IChatClient
dotnet/samples/GettingStarted/AgentProviders/Agent_With_GoogleGemini/GeminiChatClient.cs Internal IChatClient implementation wrapping Google.GenAI functionality (temporary until official support)
dotnet/samples/GettingStarted/AgentProviders/Agent_With_GoogleGemini/Agent_With_GoogleGemini.csproj Project configuration with Google.GenAI and Mscc.GenerativeAI.Microsoft package references
dotnet/agent-framework-dotnet.slnx Adds the new sample project to the solution with alphabetical reordering of some existing projects
dotnet/Directory.Packages.props Adds package version entries for Google.GenAI (0.6.0) and Mscc.GenerativeAI.Microsoft (2.9.3)

Comment thread dotnet/samples/GettingStarted/AgentProviders/Agent_With_GoogleGemini/Program.cs Outdated
Comment thread dotnet/samples/GettingStarted/AgentProviders/Agent_With_GoogleGemini/Program.cs Outdated
Comment thread dotnet/samples/GettingStarted/AgentProviders/Agent_With_GoogleGemini/Program.cs Outdated
Comment thread dotnet/samples/GettingStarted/AgentProviders/Agent_With_GoogleGemini/Program.cs Outdated
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 free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs .NET Usage: [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