> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentium.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Gemini Live adapter

> Connect a native Gemini Live session with explicit media formats and recovery behavior.

`GoogleLiveProvider` adapts Gemini Live to `VoiceAgent`. It uses the optional Google SDK and resolves `GOOGLE_API_KEY` when connecting.

```bash theme={null}
npm install @agentium/core@4.0.0 @google/genai
export GOOGLE_API_KEY="your-key"
```

```typescript theme={null}
import { GoogleLiveProvider, VoiceAgent } from "@agentium/core/voice";

export function createVoiceAgent() {
  return new VoiceAgent({
    name: "gemini-support",
    provider: new GoogleLiveProvider(),
    instructions: "Help with the caller's question in concise spoken sentences.",
    recovery: { fallback: "stop", maxAttempts: 3, maxElapsedMs: 30_000 },
  });
}
```

The v4 adapter default is `gemini-3.8-live`. This is a native realtime model, separate from the `google(...)` text model provider. Your account must have access to the configured Live model.

## Media and tools

Connect the returned VoiceAgent using an authenticated identity, subscribe to events, then supply mono PCM input at **16 kHz**. Output is PCM at **24 kHz**. The host captures, plays, and converts audio; the adapter does not open your microphone or speaker.

Gemini owns tool continuation at the provider connection. Let VoiceAgent coordinate local tool execution rather than issuing competing response commands. Provider-specific options are validated before opening a session.

## Reconnection

Recovery is opt-in. Gemini can resume only from a usable safe provider checkpoint. A resumption handle does not authorize replay of new audio or tool results. Unsafe checkpoints or uncertain tool effects stop recovery; see [voice recovery](/voice/recovery).

Close the session when the call ends. If your application needs separate recognition/synthesis providers and coordinator-owned history, choose [StreamingVoicePipeline](/voice/streaming) instead.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.