Jump to Content
Developers & Practitioners

Building Collaborative AI: A Developer's Guide to Multi-Agent Systems with ADK

November 5, 2025
https://storage.googleapis.com/gweb-cloudblog-publish/images/A_Developers_Guide_to_Multi-Agent_Systems_.max-2500x2500.png
Annie Wang

Google AI Cloud Developer Advocate

If you’ve ever wondered how multiple AI agents can actually work together to solve problems too complex for a single agent, you're in the right place. This guide, based on our two-part video series, will walk you through the foundational concepts of Multi-Agent Systems (MAS) and show you how Google’s Agent Development Kit (ADK) makes building them easier for developers.

Video Thumbnail
Video Thumbnail

By the end of this post, you’ll understand what multi-agent systems are, how to structure them, and how to enable communication between your agents using ADK.

Let's dive in.

What Is a Multi-Agent System?

At its core, a multi-agent system is a collection of individual, autonomous agents that collaborate to achieve a goal. To truly grasp this, let's break it down into three key ideas:

  • Decentralized Control: There’s no single “boss” agent controlling everything. Each agent makes its own decisions based on its own rules and local information. Think of a flock of birds swirling in the sky, there's no leader, but together they form incredible, coordinated patterns.
  • Local Views: Each agent only has a partial view of the system. It perceives and reacts to its immediate environment, not the entire system state. Imagine standing in a crowded stadium; you only see and react to the people directly around you, not the entire crowd simultaneously.
  • Emergent Behavior: This is where the magic happens. From these simple, local interactions, complex and intelligent global behaviors emerge. Agents working together in this way can solve tasks that no single agent could easily accomplish alone.
https://storage.googleapis.com/gweb-cloudblog-publish/images/8_bSozdwl.max-2000x2000.png

This collaborative approach allows for robust, scalable, and flexible solutions to complex problems.

How ADK Supports Multi-Agent Systems

Google’s Agent Development Kit (ADK) was built from the ground up with multi-agent systems in mind. Instead of forcing you to hack different components together, it provides a structured framework with three primary types of agents, each with a specific role:

https://storage.googleapis.com/gweb-cloudblog-publish/images/7_fe519aX.max-2000x2000.png
  • LLM Agents: These are the “brains” of the operation. They leverage large language models like Gemini to understand natural language input, reason through problems, and decide on the next course of action.

  • Workflow Agents: These are the “managers” that orchestrate how tasks get done. They don’t perform the work themselves but instead direct the flow of execution among other agents. We'll explore these in detail later.

  • Custom Agents: These are the “specialists.” When you need full control or specific logic that doesn’t fit the other agent types, you can write your own Python code by inheriting from BaseAgent.

The Foundational Concept: Agent Hierarchy

When you build with ADK, agents are organized into a hierarchy, much like a company's organizational chart. This structure is the backbone of your system and is governed by two simple rules:

  • Parent & Sub-Agents: A parent agent can manage one or more sub-agents, delegating tasks to them.

  • Single Parent Rule: Each agent can have only one parent, ensuring a clear line of command and data flow.

https://storage.googleapis.com/gweb-cloudblog-publish/images/mutliagent_blog_visual_2.max-1000x1000.png

Think of it like this: the root agent is the CEO, who oversees the entire operation. Its sub-agents might be VPs, who in turn manage directors, managers, and individual contributors. Everyone has a defined role, and together they accomplish the company's mission. See example here.

This hierarchical structure is fundamental to organizing and scaling your multi-agent system.

Orchestrating Tasks with Workflow Agents

So, we have a hierarchy. But how do we control the flow of work within that structure? This is where Workflow Agents shine. ADK provides three pre-built orchestrators to manage sub-agents:

  • SequentialAgent: This agent functions like an assembly line. It runs its sub-agents one after another, in a predefined order. The output of one agent can be passed as the input to the next, making it perfect for multi-step pipelines like: fetch data → clean data → analyze data → summarize findings. See example here.

https://storage.googleapis.com/gweb-cloudblog-publish/images/mutliagent_blog_visual_6.max-1000x1000.png
  • ParallelAgent: This agent acts like a manager assigning tasks to multiple employees at once. It runs all its sub-agents concurrently, which is ideal for independent tasks that can be performed simultaneously, such as calling three different APIs to gather information. See example here.

https://storage.googleapis.com/gweb-cloudblog-publish/images/mutliagent_blog_visual_7.max-1000x1000.png
  • LoopAgent: This agent works like a while loop in programming. It repeatedly executes its sub-agents until a specific condition is met or a maximum number of iterations is reached. This is useful for tasks like polling an API for a status update or retrying an operation until it succeeds. See example here.

https://storage.googleapis.com/gweb-cloudblog-publish/images/6_zyKwPKJ.max-2000x2000.png

Using these workflow agents, you can build complex and dynamic execution paths without getting lost in boilerplate code.

How Do Agents Communicate?

We have our structure and our managers. The final piece of the puzzle is communication. How do agents actually share information and delegate work? ADK provides three primary communication mechanisms.

Shared Session State

Shared Session State is like a shared digital whiteboard. An agent can write its result to a common state object, and other agents in the hierarchy can read that information to inform their own actions. For example, an LLMAgent can analyze user input and save the key entities to the state, allowing a CustomAgent to then use those entities to query a database.

https://storage.googleapis.com/gweb-cloudblog-publish/images/mutliagent_blog_visual_9.max-1000x1000.png

LLM-Driven Delegation

LLM-Driven Delegation is a more dynamic and intelligent form of communication. A parent agent (often an LLMAgent) can act as a coordinator. It analyzes the incoming request and uses its reasoning capabilities to decide which of its sub-agents is best suited to handle the task. For instance, if a user asks to "generate an invoice for last month," the coordinator agent can dynamically route the request to a specialized BillingAgent.

https://storage.googleapis.com/gweb-cloudblog-publish/images/mutliagent_blog_visual_10.max-1000x1000.png

Explicit Invocation (AgentTool)

Explicit Invocation (AgentTool) describes a pattern where one agent can directly call another agent as if it were a function. This is achieved by wrapping the target agent as a "tool" that the parent agent can choose to invoke. For example, a primary analysis agent might call a CalculatorAgent tool whenever it encounters a task requiring precise mathematical calculations.

https://storage.googleapis.com/gweb-cloudblog-publish/images/mutliagent_blog_visual_11.max-1000x1000.png

It's important to understand the distinction between a sub-agent and an AgentTool:

  • A Sub-Agent is a permanent part of the hierarchy—an employee on the org chart, always managed by its parent.

  • An AgentTool is like an external consultant. You call on them when you need their specific expertise, but they aren't part of your core team structure.

https://storage.googleapis.com/gweb-cloudblog-publish/images/mutliagent_blog_visual_12.max-1000x1000.png

Wrapping up

Let’s quickly recap what we've covered:

  • Multi-Agent Systems are powerful because they use decentralized control and local views to produce complex, emergent behaviors.

  • ADK provides a robust framework with three agent categories: LLM (brains), Workflow (managers), and Custom (specialists).

  • Agent Hierarchy provides the organizational structure for your system, defining clear parent-child relationships.

  • Workflow Agents (Sequential, Parallel, Loop) give you the patterns to orchestrate complex task flows.

  • Communication Mechanisms (Shared State, Delegation, and Explicit Invocation) allow your agents to collaborate effectively.

Together, these concepts make your multi-agent systems not just structured, but truly collaborative, flexible, and intelligent. Now you have the foundational knowledge to start building your own multi-agent applications with ADK. You can start coding the following tutorial here!

Resources

ADK Doc: https://google.github.io/adk-docs/ 

ADK Sample: https://github.com/google/adk-samples

ADK Codelab: https://codelabs.developers.google.com/onramp/instructions#0 

ADK Multiagent Examples: https://github.com/cuppibla/adk_tutorial/tree/main

Connect with me

Posted in