Google Gemini provider for Ananke.Orchestration — IStreamingAgentModel implementation with tool calling, structured output, and streaming via the official Google GenAI SDK. Supports both the Gemini Developer API and Vertex AI.
$ dotnet add package Ananke.Orchestration.GoogleGoogle Gemini provider for Ananke.Orchestration — IStreamingAgentModel implementation with tool calling, structured output, and token-level streaming via the official Google GenAI SDK. Supports both the Gemini Developer API and Vertex AI.
dotnet add package Ananke.Orchestration.Google
using Ananke.Orchestration.Google;
// Gemini Developer API (API key)
IStreamingAgentModel model = GeminiAgentModel.Create(apiKey, "gemini-2.5-flash");
// Vertex AI (project + location, uses Application Default Credentials)
IStreamingAgentModel model = GeminiAgentModel.CreateVertexAI(project, location, "gemini-2.5-flash");
// Or from an existing Google.GenAI.Client
var client = new Google.GenAI.Client(apiKey: apiKey);
IStreamingAgentModel model = new GeminiAgentModel(client, "gemini-2.5-flash");
var agentJob = AgentJobFactory
.Create<MyState, MyResponse>("analyze", model)
.WithSystemPrompt("You are a research analyst.")
.WithTools(searchTools)
.WithPrompt(state => $"Analyze: {state.Query}")
.MapResult((state, response) => state with { Analysis = response.Text })
.Build();
models:
gemini:
provider: gemini
model: gemini-2.5-flash
var models = new ModelResolver()
.Register("gemini", "Gemini", GeminiAgentModel.Create)
.Resolve(manifest, key => config[key]);
IStreamingAgentModel implementation (streaming + non-streaming)ResponseSchemaSchema conversionAnanke.Orchestration (transitive)Google.GenAI SDK ≥ 1.1.0Full docs, demos, and architecture: github.com/sevensamurai/Ananke