# Agents on Google AI: the agent development kit
Google's Agent Development Kit (ADK) lets you build agents that call tools in a loop until a task is actually done, instead of returning one best-guess answer and hoping. You already know the agent concept: a model that can decide to act, observe results, and act again. This lesson is about how Google productizes that pattern, when it earns its complexity, and how to ship a real one.
ADK is an open-source Python framework (with Java support too) for defining agents in code. It is the same framework Google uses internally for products like Agentspace. You define an agent, give it tools, pick a Gemini model, and ADK runs the reason-act-observe loop for you.
The key objects:
ADK is model-flexible but tuned for Gemini. You develop locally, test in a built-in web UI, then deploy to Vertex AI Agent Engine, Google Cloud's managed runtime for agents. Local-to-production uses the same code.
If you only need the model to call one function once, you do not need ADK. ReachReachThe number of unique people exposed to your message in a given period. Unlike impressions, reach counts each person once, no matter how often they see it.View full definition → for it when the task is multi-step.
A single Gemini call (even with function calling) is the right tool when the work is one step: classify this email, extract these fields, draft this reply. Gemini's long context and native multimodality already let one call do a lot.
An agent earns its keep when the number of steps is unknown in advance and depends on what intermediate results come back. Signs you have crossed that line:
A "research and summarize this topic" task is the canonical example. You cannot know up front how many searches it will take to cover a topic well. The agent decides that at runtime. That dynamic, data-dependent looping is exactly what a single call cannot do and what ADK exists to manage.
The cost is real: more latency, more tokenstokensA token is the basic unit of text that language models process, often a word fragment, whole word, or punctuation mark rather than a single character.View full definition →, more ways to fail. Use Flash for the loop where you can (it is fast and cheap), reserve Pro for the steps that need deep reasoning, and never reachreachThe number of unique people exposed to your message in a given period. Unlike impressions, reach counts each person once, no matter how often they see it.View full definition → for an agent when a single structured call would do.
Let's build one. The agent takes a topic, uses Google Search grounding to gather current information, loops until it has enough, then writes a structured summary.
First, set up the environment. You need the SDK and a Gemini APIAPIApplication Programming Interface: a standardised interface that lets applications communicate and exchange data without knowing each other's internal workings.View full definition → key from Google AI Studio (or Vertex AI credentials if you deploy to Cloud).
pip install google-adk
export GOOGLE_API_KEY="your-key-here"
export GOOGLE_GENAI_USE_VERTEXAI=FALSENow the agent. ADK ships a built-in google_search tool that grounds responses in live Google Search results, so you do not write the search plumbing yourself.
from google.adk.agents import Agent
from google.adk.tools import google_search
root_agent = Agent(
name="research_summarizer",
model="gemini-2.5-flash",
description="Researches a topic and writes a sourced summary.",
instruction=(
"You are a research assistant. Given a topic, search for "
"current, credible information. Run multiple searches if the "
"first results are thin or one-sided. Stop when you can cover "
"the topic accurately. Then write a summary with: a two-line "
"overview, 3 to 5 key findings as bullets, and a 'Sources' "
"list. Never state a fact you did not find in results."
),
tools=[google_search],
)That instruction is doing the heavy lifting. Notice it tells the agent *when to loop* ("run multiple searches if the first results are thin") and *when to stop* ("when you can cover the topic accurately"). Vague stop conditions are the number one cause of agents that loop forever or quit too early.
ADK gives you a dev UI to watch the loop, including every tool call and the model's reasoning between steps. From the folder containing your agent:
adk webThis opens a local browser UI where you type a topic and watch the agent search, observe, search again, and write. Seeing the intermediate steps is how you debug instructions. If the agent searches once and stops, your stop condition is too loose. If it searches eight times for a simple topic, tighten it.
To run headless instead, ADK exposes a Runner you can call from your own code or wrap in an APIAPIApplication Programming Interface: a standardised interface that lets applications communicate and exchange data without knowing each other's internal workings.View full definition →.
The google_search tool is not just "search." It is grounding with Google Search, which feeds real results into the model and returns source metadata. For a research agent this is the difference between a confident summary and a *correct* one. Without grounding, the model writes from training data that has a cutoff. With it, the agent reads today's web. Always ground agents that make factual claims about the current world.
The built-in search is fine, but real agents need *your* tools: a function that hits your database, posts to Slack, or writes to a Google Sheet. In ADK a tool is just a typed Python function with a clear docstring. The docstring is not documentation for you, it is the description the model reads to decide when to call it.
def save_summary(topic: str, summary: str) -> dict:
"""Saves a finished research summary to the team archive.
Args:
topic: The researched topic, used as the record title.
summary: The full formatted summary text to store.
Returns:
A dict with 'status' and the saved record 'id'.
"""
record_id = _write_to_store(topic, summary)
return {"status": "ok", "id": record_id}Add it to the agent's tools list alongside google_search. Now the agent can research *and* archive in one loop. Write tool docstrings like you are explaining the function to a smart new hire: what it does, what each argument means, what it returns. Sloppy docstrings cause the model to call tools at the wrong time or pass garbage arguments.
One important constraint: ADK's built-in tools like google_search have rules about combining with custom tools depending on the model. When in doubt, split responsibilities across multiple agents.
ADK's real power shows up with multi-agent systems: one coordinator agent that delegates to specialist sub-agents. For our example you might have a researcher agent (search only) and a writer agent (formatting and archiving), with a coordinator that routes between them.
This matters because each agent stays focused. A focused agent with three tools behaves far more reliably than one agent juggling ten. You define sub-agents and hand them to a parent via the sub_agents parameter; the parent decides who handles what. Start with a single agent, and split only when one agent's instructions get long and conditional.
Knowledge check
1. In Google's Agent Development Kit (ADK), which object is responsible for executing the reason-act-observe loop and managing sessions and state?
2. According to the lesson, where do ADK agents run in production?
3. In the Gemini ecosystem, what are 'Gems' as described in the lesson?
4. Select ALL correct answers about what ADK is, according to the lesson.
Sélectionnez toutes les réponses correctes.
5. Select ALL correct answers about when you should reach for ADK versus a single Gemini call.
Sélectionnez toutes les réponses correctes.
Local adk web is for building. Production is Vertex AI Agent Engine, a managed service that hosts your agent, handles sessions, scales, and integrates with the rest of Vertex AI. The same agent code deploys with minimal changes; you mostly flip from APIAPIApplication Programming Interface: a standardised interface that lets applications communicate and exchange data without knowing each other's internal workings.View full definition →-key auth to Vertex AI auth and point ADK at your Google Cloud project.
What you get by deploying to Agent Engine instead of running your own server:
For agents that act on company data, that last point is the whole reason to be on Vertex rather than calling the raw Gemini APIAPIApplication Programming Interface: a standardised interface that lets applications communicate and exchange data without knowing each other's internal workings.View full definition → from a script.
An agent that works in a demo and an agent that works on real inputs are different things. ADK includes an evaluation capability: you define test cases (input plus expected behavior or expected tool trajectory), and ADK runs the agent against them and scores both the final response and *which tools it called in what order*.
This trajectory check is specific to agents and crucial. A single call you evaluate on output alone. An agent you also evaluate on its *path*, because an agent that gets the right answer by accident (or burns twenty tool calls to get there) is not production-ready. Build a handful of eval cases before you deploy, and rerun them every time you change an instruction.
Think of ADK as the layer that turns Gemini from "a model that can suggest a tool call" into "a process that drives a task to completion." The model is still the brain. ADK is the loop, the memory, the routing, the deployment, and the test harness around it. You bring three things: sharp instructions (especially stop conditions), well-described tools, and eval cases. ADK and Vertex handle the rest.
google_search tool so summaries reflect the live web, not the training cutoff.