Skip to content
Rasmus Wulff Jensen edited this page Dec 26, 2025 · 5 revisions

Google (Gemini)

Features

  • AgentFactory (GoogleAgentFactory)
  • AIToolsFactory integration (tools in GoogleAgentOptions.Tools)
  • Thinking budget via ThinkingBudget

Package

dotnet add package AgentFrameworkToolkit.Google

Quick start

GoogleAgentFactory agentFactory = new("<apiKey>");
GoogleAgent agent = agentFactory.CreateAgent(new GoogleAgentOptions
{
    Model = "gemini-2.5-flash",
    ThinkingBudget = 5000,
    Instructions = "You are a nice AI"
});

AgentRunResponse response = await agent.RunAsync("Hello World");
Console.WriteLine(response);

Connection options

  • ApiKey (required)
  • Adapter (IPlatformAdapter, optional)

Dependency injection

builder.Services.AddGoogleAgentFactory("<apiKey>");
builder.Services.AddGoogleAgentFactory(new GoogleConnection
{
    ApiKey = "<apiKey>"
});

Notes

Clone this wiki locally