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
SetGEMINI_API_KEY, then use the gemini:<model> id:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
agentscope-extensions-model-gemini integrates Google Gemini models through the Gemini API and supports the Vertex AI path through explicit configuration.
<dependency>
<groupId>io.agentscope</groupId>
<artifactId>agentscope-extensions-model-gemini</artifactId>
<version>${agentscope.version}</version>
</dependency>
GEMINI_API_KEY, then use the gemini:<model> id:
ReActAgent agent = ReActAgent.builder()
.name("assistant")
.model("gemini:gemini-2.0-flash") // Resolved internally by ModelRegistry.resolve(modelId)
.build();
import io.agentscope.extensions.model.gemini.GeminiChatModel;
GeminiChatModel model = GeminiChatModel.builder()
.apiKey(System.getenv("GEMINI_API_KEY"))
.modelName("gemini-2.0-flash")
.streamEnabled(true)
.build();
<dependency>
<groupId>io.agentscope</groupId>
<artifactId>agentscope-gemini-spring-boot-starter</artifactId>
<version>${agentscope.version}</version>
</dependency>