Google Agent Development Kit Explained: Building Multi-Agent Hierarchies with Gemini

Google ADK builds multi-agent systems from a tree of specialist agents. This explainer covers the main patterns, delegation and shared state.

By Galactic News Editorial · Published 2026-11-27T14:14:47+00:00 · Updated 2026-11-27T14:14:47+00:00

Google Agent Development Kit multi-agent hierarchies explained with Gemini

Google Agent Development Kit Explained: Building Multi-Agent Hierarchies with Gemini

Google Agent Development Kit multi-agent hierarchies let one system split a hard job across specialist agents, with a coordinator understanding the request, specialists handling the parts they know best, and workflow nodes running the steps that must happen in a fixed order. This explainer covers the patterns the framework provides, how delegation works, and how state flows between levels.

What the framework is

ADK is Google's open-source, code-first framework for building agents in Python, and it also ships in Java, Go, Kotlin and TypeScript, so teams can define agents in code, give them tools, and compose them into systems. Install it with a single command:

pip install google-adk

ADK needs Python 3.11 or newer, and the core building blocks are LlmAgent, for model-driven decisions, plus three workflow nodes: SequentialAgent, ParallelAgent and LoopAgent. Workflow nodes run their children in a fixed pattern with no model call, while LlmAgent nodes make the judgement calls, and a hierarchy mixes both.

Run an agent locally with the built-in tools, since the command adk run starts an interactive session, while the command adk web opens a development UI in the browser. Deploy with adk deploy cloud_run for Cloud Run, or to Vertex AI Agent Engine for a managed runtime, and the kit supports both paths without changing the agent code.

The tree: parents, children and the root

Every team system in ADK is a tree, where each agent has a parent pointer and a list of sub-agents, and the root agent is the entry point where the runner starts. An agent cannot belong to two parents, because the parent pointer is a single field, so if a specialist appears in two places, build a fresh instance for each one, and a factory function is the clean way to do that.

The tree mixes model-driven nodes with deterministic workflow nodes, and a supervisor at the root understands the request and delegates, while specialists below it own a narrow job with a short instruction and a small tool set. Deterministic workflow nodes handle the parts that should not be left to a model's judgement, such as running a review pipeline in a fixed order.

Four patterns for building teams of specialists

Google's own developer guide describes eight patterns, and four cover most real systems.

Sequential pipeline

Agents run in order, like an assembly line, where a parser reads a document, an extractor pulls the facts, and a summarizer writes the result. SequentialAgent handles the orchestration, and state passes between steps through output_key, so each agent writes its result to shared session state and the next agent reads it from there.

Coordinator and dispatcher

A central agent routes work to specialists, and it does not do the work itself, because it reads the request, picks the right specialist, and hands over. ADK's AutoFlow mechanism transfers execution based on the descriptions written for each child, and this pattern suits support desks and triage systems, where one coordinator can front a billing specialist and a tech support specialist.

Parallel fan-out and gather

Several agents run at the same time, which cuts latency or gathers diverse views, and ParallelAgent runs its sub-agents simultaneously. A common shape is parallel reviewers feeding a summarizer, where a security scanner, a style checker and a complexity analyzer all read the same code, then one agent merges their findings.

Hierarchical decomposition

A task too big for one context window splits into layers, where a report writer delegates research to a research assistant, and that assistant manages its own web search and summarizer agents. The parent delegates part of a task and waits for the result before continuing its own reasoning, and this is the pattern behind most serious multi-agent systems.

Two ways to delegate: transfer and AgentTool

ADK offers two delegation mechanisms, and they behave very differently.

Transfer hands the conversation to another specialist, and when an LlmAgent has transfer targets, the framework adds a function called transfer_to_agent to the model request, so the model chooses the target from the descriptions provided. An agent's own sub-agents are always offered, while its parent and peers are offered only if the parent is itself an LlmAgent, and each direction can be switched off with disallowTransferToParent and disallowTransferToPeers. Transfer suits conversations where the user should keep talking to the new specialist.

AgentTool wraps an agent as a tool, so the parent calls it like a function and gets a result back, while control never leaves the parent. This suits background work such as checking a policy, running a search, or validating a claim, and the parent keeps the conversation and uses the result in its own reply.

Choose transfer when the user should talk to the specialist, and choose AgentTool when the parent needs an answer and should keep control.

Shared state and a worked example

State is how agents in a hierarchy share results, because SequentialAgent steps write to session state with output_key, and later steps read those values, while LoopAgent repeats its children until a condition is met. This is how a pipeline avoids passing huge outputs through the model at every step.

A minimal hierarchy in Python looks like this:

from google.adk.agents import LlmAgent
from google.adk.tools import google_search

researcher = LlmAgent(
    name="Researcher",
    model="gemini-2.5-flash",
    instruction="Research topics thoroughly using web search.",
    tools=[google_search],
)

writer = LlmAgent(
    name="Writer",
    model="gemini-2.5-flash",
    instruction="Write clear summaries from research findings.",
)

coordinator = LlmAgent(
    name="Coordinator",
    model="gemini-2.5-flash",
    instruction="Delegate research to Researcher, then send findings to Writer.",
    sub_agents=[researcher, writer],
)

The coordinator receives the request, transfers to the researcher, and the researcher searches and returns findings, which the coordinator then passes to the writer. Each agent holds a short instruction and a small tool set, and that is the whole design principle: narrow specialists, clear handoffs, and one root.

When hierarchies help and when they hurt

Layered teams help when a task has distinct skills, when parts can run in parallel, or when one agent's context would overflow, yet they hurt when the job is simple, because a single agent with good tools beats a five-agent tree for a simple question. Every handoff adds latency and a chance of error, so structure should be added only when the task demands it.

Common failure modes are easy to name, and each one has a direct fix:

Bottom line

Start with one LlmAgent and add structure only when the task demands it, using SequentialAgent for fixed pipelines, a coordinator for routing, ParallelAgent for simultaneous review, and AgentTool when the parent should keep control. Narrow specialists and clear handoffs are what make a multi-agent hierarchy work.