Google ADK and Gemini Live API voice agent tutorial

Learn a browser-to-backend voice agent design with Google ADK and Gemini Live API, including parallel audio streams and in-memory sessions.

Player not loading? Watch on YouTube

Annie Wang explains how to build a voice AI agent with Google ADK and Gemini Live API, using a video DJ that takes music requests as the example. The tutorial describes a browser microphone and player connected over WebSocket to a backend, which maintains a persistent two-way connection to Gemini Live. The model connection uses an API; the episode does not demonstrate offline inference.

The ADK agent definition supplies the model, instructions and tools. A Runner manages the live call and returns events, while a Session holds conversation state. Wang recommends keeping that session in memory for this design. She says the hosted session service writes an event for each audio chunk, adding network round trips that can delay the voice response.

The live loop uses LiveRequestQueue to separate incoming microphone audio from outgoing events. The tutorial distinguishes send_realtime() for continuous audio from send_content() for complete inputs such as typed messages or photos. Wang advises sending silent audio too, so voice detection can identify the end of a sentence. The application handles voice chunks, captions and tool requests as events arrive, and stops playback when an interruption event signals that the user has spoken over the agent. Detailed tool implementation is reserved for the next episode.