Skip to main content
agentscope-extensions-model-gemini integrates Google Gemini models through the Gemini API and supports the Vertex AI path through explicit configuration.

Add the dependency

ModelRegistry

Set GEMINI_API_KEY, then use the gemini:<model> id:

Explicit builder

Use the builder when you need custom API settings, Vertex AI credentials, formatter, transport, or generation options:

Server-side tools

Gemini built-in tools run on the model provider instead of the local AgentScope toolkit. Build a Google GenAI SDK Tool definition, then wrap it with GeminiServerTool.of(...):
When at least one server-side tool is configured, AgentScope enables Gemini server-side invocation context automatically and preserves returned calls and results in conversation history. Server-side tools can be combined with local function tools. Do not use GeminiServerTool.of(...) for custom function tools; it rejects those definitions.

Spring Boot

Spring Boot applications can use the Gemini starter:
Full builder options, formatters, credentials, and registry context details are covered in Model.