Google Gemini Configuration
Relevant source files
The following files were used as context for generating this wiki page:
Google Gemini Configuration refers to the settings and integration parameters required to use Google's generative AI models as a remote LLM provider within the Agent application. The application manages Gemini as a remote LLMProvider alongside local options like Ollama and LM Studio.
The system uses the Gemini API to process user prompts and generate technical responses. Users must provide a valid API key and select a supported model to activate this provider. The project includes dependencies for @google/genai to support these interactions.
Sources: src/data.ts:32-38, package.json:37, README.md:16-17
Provider Setup
The DEFAULT_PROVIDERS constant defines the initial configuration for Google Gemini. It classifies Gemini as a remote provider type, distinct from local or custom simulator types.
Configuration Properties
| Property | Value / Description |
|---|---|
| ID | google |
| Name | Google Gemini (Remote) |
| Base URL | https://generativelanguage.googleapis.com/v1beta |
| Type | remote |
| Default Model | gemini-2.5-flash |
Sources: src/data.ts:32-38
Model Availability
The application supports multiple versions of Gemini models. Users select these models via the Chat Interface to adjust for speed or reasoning depth.
gemini-2.5-flash(Default)gemini-2.5-progemini-1.5-flash
Sources: src/data.ts:37
Environment and API Management
The application requires a GEMINI_API_KEY to authenticate requests. The configuration method varies depending on the deployment platform.
Local Development
For local runs, you must set the GEMINI_API_KEY in a .env.local file. This key enables the application to communicate with the Google Generative Language API.
Sources: README.md:16-17
Desktop and Mobile Builds
Specific strategies exist for handling the API key in production environments:
- Desktop (Tauri): Set via OS environment variables or a configuration dialog.
- Mobile (Capacitor): Embed via
capacitor.config.tsor a secure storage plugin.
Sources: BUILDING.md:108-111
Integration Architecture
The following diagram illustrates how the Gemini provider interacts with the Agent workspace and external Google APIs.
The AI Dispatcher identifies the active provider. If the active provider ID is google, the application attempts to route the prompt to the Google API using the stored API key.
Sources: src/utils/ai.ts:24-30, src/data.ts:32-38
Session Parameters
When using Gemini, the application passes session-specific parameters to control the output behavior. These parameters are adjustable within the ChatArea configuration panel.
- Temperature: Controls determinism vs. creativity. Lower values (e.g., 0.2) prioritize deterministic code, while higher values trigger creative analysis.
- Max Context Tokens: Truncates output buffers. Standard models operate between 4k-8k tokens.
Sources: src/components/ChatArea.tsx:168-196
Summary
Google Gemini serves as a high-performance remote backend for the Agent Studio MCP Engine. By configuring the GEMINI_API_KEY and selecting from the gemini-2.5 or gemini-1.5 model families, users enable remote AI capabilities that complement local Model Context Protocol (MCP) tools and filesystem sandboxes.