The Google Agent Development Kit (ADK) is an open-source framework for building and orchestrating multi-agent systems. Compared to using the rawDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/derailed-dash/gemini-file-search-demo/llms.txt
Use this file to discover all available pages before exploring further.
google-genai SDK, ADK gives you declarative agent definitions, built-in state management, a ready-made web UI for interactive testing, and a deployment path that requires no additional UI code. This page converts the baseline Google Search agent into an ADK agent and introduces the two-agent structure that makes delegation visible and controllable.
Why ADK over the raw SDK?
The raw SDK is great for quick scripts, but it lacks structure for anything beyond a single loop. ADK provides:- Declarative agents — define each agent’s model, name, description, instruction, and tools in one
Agent(...)call. - Multi-agent orchestration — compose specialist agents and wire them together using the
AgentToolwrapper. - ADK Web UI — a zero-code browser interface that shows agent delegation in real time.
adk run/adk webCLI — a consistent way to launch, reload, and serve agents during development.
The two-agent structure
Thebasic_agent_adk implementation in app/basic_agent_adk/agent.py defines two agents:
| Agent | Role | Tools |
|---|---|---|
SearchAgent | Specialist — runs Google Search | google_search |
root_agent (basic_agent_adk) | Orchestrator — handles user interaction, delegates to SearchAgent | AgentTool(agent=search_agent) |
google_search directly. Instead, it treats SearchAgent as a tool using AgentTool. This keeps concerns separated and makes the delegation visible in the ADK Web UI.
The code
Here is the completeapp/basic_agent_adk/agent.py:
app/basic_agent_adk/agent.py
Key patterns
Agent(...) — the core ADK building block. Every agent declares its model, name, description, instruction, and tools up front. The description is what the orchestrating agent reads to decide whether to delegate.
AgentTool(agent=search_agent) — wraps a complete Agent as a callable tool. The root agent invokes SearchAgent the same way it would call any other tool. This is the Agent-as-a-Tool pattern.
Gemini(model=model, retry_options=...) — the root agent uses an explicit Gemini model object instead of a plain model ID string, so retry behaviour can be configured.
The fail-fast system instruction
The root agent’s instruction includes an explicit fail-fast directive:Launch the ADK Web UI
Start the web server
Run the following from the project root:The command points
adk web at the app/ folder. ADK automatically discovers any subpackage that exposes a root_agent.Open the browser
- Local environment: navigate to
http://127.0.0.1:8501 - Cloud Shell: click Web preview in the toolbar and change the port to
8501
The
--reload_agents flag makes ADK reload agent code on each request, so you can edit agent.py and see changes immediately without restarting the server.Try it out
General knowledge query (succeeds)
Ask a question that requires a live Google Search, such as:SearchAgent in real time. SearchAgent performs one Google Search, returns the result, and the root agent summarises it for you.