Get started with the Live API using ADK Stay organized with collections Save and categorize content based on your preferences.
This tutorial shows you how to create an agent and use the Agent Development Kit(ADK) Streaming to enable voice and video communication. You install the ADK,set up a basic agent that uses Google Search, and run the agent with theadkweb tool.
Before you begin
This guide assumes you have experience using a terminal in Windows, macOS, orLinux environments.
Set up your environment and install the ADK
This section shows you how to prepare your local environment.
Create and activate a virtual environment. Using a virtual environment is arecommended practice.
# Create the environmentpython-mvenv.venv# Activate the environment in each new terminal# For macOS or Linux:source.venv/bin/activate# For Windows CMD:.venv\Scripts\activate.bat# For Windows PowerShell:.venv\Scripts\Activate.ps1Install the ADK.
pipinstallgoogle-adk
Create the project structure
Create the necessary directories and files for your agent.
Create the following folder structure with empty files:

Add the following code to the
app/google_search_agent/agent.pyfile. Thisfile defines your agent's logic. You must define aroot_agent. In thefollowing code, update themodelfield with a supported model name.fromgoogle.adk.agentsimportAgentfromgoogle.adk.toolsimportgoogle_search# Import the toolroot_agent=Agent(# A unique name for the agent.name="basic_search_agent",# The Large Language Model (LLM) that agent will use.# Please fill in the latest model id that supports live from# https://google.github.io/adk-docs/get-started/streaming/quickstart-streaming/#supported-modelsmodel="...",# for example: model="gemini-live-2.5-flash-preview-native-audio-09-2025"# A short description of the agent's purpose.description="Agent to answer questions using Google Search.",# Instructions to set the agent's behavior.instruction="You are an expert researcher. You always stick to the facts.",# Add google_search tool to perform grounding with Google search.tools=[google_search])Add the following code to the
app/google_search_agent/__init__.pyfile:from.importagent
Set up the platform
To run the agent, configure it to use Google Cloud Vertex AI.
Open the
.envfile located in theapp/directory.Add the following content to the file. Replace
PROJECT_IDwith your Google Cloud project ID and replaceLOCATIONwith your Google Cloud location.GOOGLE_CLOUD_PROJECT=PROJECT_IDGOOGLE_CLOUD_LOCATION=LOCATIONGOOGLE_GENAI_USE_VERTEXAI=True
Run the agent with the dev UI
Launch the development user interface to interact with your agent.
Change your current directory to
app.cdappSet the
SSL_CERT_FILEenvironment variable. This step is required forvoice and video tests.macOS/Linux
exportSSL_CERT_FILE=$(python-mcertifi)
Windows
$env:SSL_CERT_FILE=(python-mcertifi)
Run the dev UI.
Note: If you use Windows and encounter aadkwebNotImplementedError, runadk web--no-reloadinstead.Open the URL provided in the terminal, which is typically
http://localhost:8000orhttp://127.0.0.1:8000.Select
google_search_agent.
The following diagram shows how user input flows to the agent, how the agent usesthe Google Search tool, and how the agent returns a response:

Interact with the agent
After you launch the dev UI, you can interact with your agent by using text,voice, or video.
Use text input
Enter the following prompts in the UI to test the agent's text-based responses.The agent uses thegoogle_search tool to get the latest information to answerthese questions.
- What is the weather in New York?
- What is the time in New York?
- What is the weather in Paris?
- What is the time in Paris?
Use voice and video input
To use voice input, reload the web browser and click the microphone button. Aska question, and you hear the answer in real time.
To use video input, reload the web browser and click the camera button. Ask aquestion like "What do you see?", and the agent describes what it sees from thevideo input.
Note: Click the microphone or camera button only once to start streaming.Clicking the buttons multiple times is not supported.Stop the dev UI
To stop theadk web tool, pressCtrl+C in the terminal where it is running.
What's next
- To learn more about Live API development using ADK, see theADK documentation.
- See theBidi-streaming demo.
- Get started using the Gen AI SDK.
- Get started using WebSockets.
- Learn how toconfigure language and voice.
- Learn how toconfigure Gemini capabilities.
- Learn aboutGemini Live API best practices.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-19 UTC.