BidiGenerateContent WebSocket
protocol end to end: it opens the session, upsamples the call’s audio to the
rate Gemini expects, streams the model’s spoken reply back onto the leg, and
wires Gemini’s server-side voice activity detection to barge-in. You turn it on
by naming gemini as the provider in your agent config — there is no code to
write.
Gemini Live is one of several duplex providers. For the shared model of how a
speech-to-speech agent works — the single
REALTIME node, the greeting
behavior, session budgets — see
BYO Speech-to-Speech Models.
This page covers the Gemini-specific config, voices, and behavior.Configure a Gemini Live agent
A duplex agent has a single node. Set the entry node toREALTIME, name
gemini as the provider, and pick a model and a voice.
Name gemini in the agent spec
Set to
gemini to select the Gemini Live adapter.A Gemini Live model id, e.g.
gemini-2.0-flash-exp. The adapter
qualifies it to Gemini’s required models/<id> form for you, so either
gemini-2.0-flash-exp or models/gemini-2.0-flash-exp works.One of Gemini’s prebuilt voices:
Aoede, Charon, Fenrir, Kore, or
Puck. Leave it empty to accept Google’s server default. The runtime
defaults to Aoede when you omit it.The system prompt. It is sent as Gemini’s
systemInstruction in the
opening setup message and also seeds the inbound greeting.Supply your Gemini API key
Credentials are stored per tenant and never shared across workspaces.
Add your Gemini API key in the agent console at
agent.telequick.dev, or
via the control-plane API at portal.telequick.dev. The runtime reads it
when it opens the session — no key means the provider returns no session and
the call falls back to a silent passthrough rather than dropping.How the audio flows
You never touch sample rates — the adapter handles the conversions Gemini requires:Caller audio in
The call’s 8 kHz PCM16 is upsampled to the 16 kHz PCM16 Gemini
Live expects on input and streamed as
realtimeInput.audio frames.Model audio out
Gemini returns 24 kHz PCM16 audio, which the runtime resamples down
and paces back onto the call leg (G.711 to the caller on a phone leg, Opus
to a browser leg).
Turn-taking
For aREALTIME entry node the runtime defaults to server_vad — Gemini
Live does its own endpointing and interruption detection, so you do not add
a local turn detector. When Gemini reports an interruption the runtime maps it
to barge-in and stops the outgoing audio. If you want to tune how aggressively
the agent yields, or to understand the fallback behavior for models without
server VAD, see
Turn Detection & Barge-In.
Greeting on inbound calls
Some carrier SBCs withhold RTP until they hear yours. On an inbound call the runtime prompts Gemini to speak first so the media path opens — the model greets from yourinstructions. This is on by default for inbound direct-media
calls; no extra config is required.
Tools mid-conversation
The Gemini Live adapter renders your configured tools into Gemini’sfunctionDeclarations in the opening setup message, receives toolCall
events during a spoken turn, and returns your result as a toolResponse — so
the model can call an HTTP or MCP tool and speak the outcome without leaving
the call. Configure tools exactly as you would for any agent; see
Tool Calling.
Function calling over Gemini Live is newer than the
OpenAI Realtime path, which
is the most battle-tested realtime adapter today. If your agent leans heavily
on complex multi-tool turns, validate the behavior on a staging number before
you route production traffic.
Session budgets
Every realtime session is bounded so a stuck provider can’t run forever: the handshake is given a few seconds before the runtime gives up and falls back, and sessions are closed at a 15-minute ceiling even if the provider hasn’t. Tune lifetime, idle re-engage, and hangup budgets on Session Lifecycle.Next steps
Speech-to-speech model
The shared duplex-agent model, greeting behavior, and provider matrix.
OpenAI Realtime
The most complete realtime adapter — server VAD, function calling, greeting.
Turn detection
Tune barge-in, endpointing, and backchannel handling.
All runtime knobs
Models, codecs, budgets, and guardrails in one reference.