Skip to content
Gemini Relay • Antigravityv1.2.0

Gemini RelayGoogle Gemini 3.8 & Antigravity for AI Agents

Unleash Google's Gemini 3.8 Flash, Gemini 3.1 Pro, reasoning depth, and Imagen multimodal generation directly inside Claude Code, Cursor, and autonomous agent workflows.

🎮 Interactive Agent Console

Experience how Claude Code interacts with gemini-relay in real-time across architectural planning, large context inlining, visual generation, and structured outputs.

🤖 Claude Code <—> Gemini Relay Console
agy v1.1.25 • Gemini 3.8
Claude Code Querygemini-plan(task, effort: "high")
"Use gemini-plan to architect a low-latency websocket streaming server with automatic token refresh and backpressure."
Model:gemini-3.8-flash-high
Thinking:4,180 tokens
Duration:3.4s
Status:SUCCESS 200
### 📋 Architectural Blueprint: Resilient WebSocket Server
**Mode:** --mode plan | **Reasoning Effort:** High (4,180 thinking tokens)

#### Phase 1: Core Stream Engine & Backpressure
- Implement stream.Writable with highWaterMark: 64KB.
- Buffer overflow strategy: Pause socket frame ingestion when client buffer exceeds 80% threshold.

#### Phase 2: Autonomous Token Rotation
- Background lease manager checking JWT expiry at T-60s.
- Non-blocking handshake refresh without closing established TCP sockets.

#### Phase 3: Failure Modes & Recovery
- Exponential backoff with full jitter: min(30s, 100ms * 2^attempt + rand(0, 50ms)).

🧠 Reasoning Effort Depth Engine

Explore the thinking token budgets available across Gemini 3.8 Flash and Gemini 3.1 Pro.

Gemini 3.8 Reasoning Depth Engine

Dynamic Thinking Budget

Control thinking token depth per tool call using effort: "low" | "medium" | "high".

Thinking DepthDeep Algorithmic Thinking
Typical Latency~4.0s - 8.0s
Recommended Modelgemini-3.8-flash-high
🎯 Ideal Workflows:

Security vulnerability audits, race conditions, distributed architecture design, mathematical algorithms, and comprehensive system planning (gemini-plan).

MCP Tool Call Configurationeffort: "high"
await useGeminiPlan({
  task: "Design distributed lock mechanism with Redis & auto-renew",
  context: "High-throughput financial ledger API with strict consistency",
  effort: "high"
});

🌟 Supported Gemini 3.8 & 3.1 Model Matrix

MAX REASONING

gemini-3.1-pro-high

Deep Architectural Thinker

Top-tier complex problem solving, formal mathematical algorithms, concurrency analysis, and mission-critical architecture.

Reasoning Depth:Maximum Flagship
Context Window:2M+ Tokens
Execution Speed:Deliberate (~5-8s)
Security AuditsDistributed SystemsProofs
INSTANT THROUGHPUT

gemini-3.8-flash-low

Zero-Latency Engine

Optimized for instant parsing, commit summaries, AST linting, and high-frequency queries without thinking delay.

Reasoning Depth:Low / Instant
Context Window:1M+ Tokens
Execution Speed:Near-Instant (<1s)
High QPSSummariesFormatting

⚡ One-Line Setup for Claude Code

Add the MCP server to your local Claude Code instance in seconds:

bash
claude mcp add gemini-relay -- npx -y gemini-relay

Verify your setup at any time by asking Claude:

"Run gemini-doctor to check the status of the MCP server and active backend"

Released under the MIT License.