aiml

All Google ADK courses

Building Live and Voice Agents with Google ADK 2.0

Google ADK 2.0

Stream audio and screen frames with ADK live agents, handle tools and sessions, test voice callbacks, and build a custom WebSocket bridge.

What is a live voice agent?

A live voice agent processes spoken input and returns audio over an ongoing connection. A live connection carries input audio and output events in both directions. The application must receive microphone frames while handling transcripts, model audio and tool results. A completed text event and audio already played to a caller are different observations.

Follow one spoken documentation question through the input queue, the Live API and the client’s playback state. Then add document tools, inspect interruptions and build a WebSocket bridge whose two loops clean up when either direction stops. Saved transcripts and audio remain tied to their recorded runs.

What you'll learn

  • Stream audio, transcriptions and control events through run_live.
  • Manage live sessions, media formats and tool responses.
  • Sequence live task nodes and inspect typed handoffs.
  • Test callback limits and clean up custom WebSocket connections.

Lessons

Module 1 · 3 lessons · about 1 hourStream media and manage live sessions

Send audio and JPEG frames, configure voice and manage live events and sessions.

  1. Stream a voice conversation with run_liveRead

    Open an ADK live connection, send text and microphone audio, inspect transcripts and audio events, and compare saved answers with and without the docs page.

    25 min readLabQuiz

  2. Read live events and manage live sessionsRead

    Fold ADK live events into captions, handle interruptions, inspect saved session history, and test reconnect behavior with and without a handle.

    30 min readLabQuiz

  3. Send audio, images and video, and configure voiceRead

    Send PCM audio and JPEG frames to an ADK live agent, choose its voice, use push-to-talk signals, and diagnose format and configuration failures.

    25 min readLabQuiz

Module 2 · 2 lessons · about 55 minCall tools and run live workflows

Handle tool calls during a live conversation and run live agents inside workflows.

  1. Call tools during a live conversationRead

    Run docs lookup and background tools in an ADK live conversation, inspect function responses, and reproduce tool errors and model-specific limits.

    30 min readLabQuiz

  2. Run live agents inside a workflowRead

    Sequence a voice intake and docs-answer agent with ADK Workflow, inspect the typed handoff, and test live modes and incomplete transcripts.

    25 min readLabQuiz

Module 3 · 2 lessons · about 50 minTest and serve live agents

Test voice callbacks and handle connection cleanup in a custom WebSocket server.

  1. Guard and evaluate a voice agentRead

    Test ADK live input, output and tool callbacks, inspect audio delivered before a block, and check what a recorded speech evaluation really scored.

    25 min readLabQuiz

  2. Build a custom WebSocket server for a live agentRead

    Bridge a WebSocket client to an ADK live agent with binary audio, JSON events, bounded concurrent sessions and cleanup when either direction stops.

    25 min readLabQuiz