Workflow agents and communication in ADK
By Google Cloud Tech
Key Concepts
- Multi-agent systems (MAS): Systems composed of multiple interacting intelligent agents.
- ADK: A framework for building multi-agent systems.
- Agent hierarchy: An organizational structure where agents are arranged in a parent-child relationship.
- Workflow agents: Specialized agents in ADK that control the flow of work among sub-agents.
- Sequential agents: Workflow agents that execute sub-tasks in a fixed, ordered sequence.
- Parallel agents: Workflow agents that execute independent sub-tasks concurrently.
- Loop agents: Workflow agents that repeatedly execute tasks until a condition is met or a maximum iteration count is reached.
- Communication mechanisms: Methods by which agents exchange information and coordinate actions.
- Shared session state: A communication mechanism where agents read from and write to a common, shared memory space.
- LLM-driven delegation: A communication mechanism where a coordinating agent (often an LLM) intelligently routes tasks to appropriate sub-agents based on the request.
- Coordinating agent: An agent responsible for overseeing and delegating tasks within a multi-agent system.
- Explicit invocation (Agent as a Tool): A communication mechanism where one agent calls another agent like a function or a specialized tool, outside of a direct hierarchical sub-agent relationship.
- Sub-agent: An agent that is part of another agent's direct hierarchy and is managed by its parent.
Workflow Agents: Structuring the Flow of Work
This section details how ADK enables control over the execution flow within multi-agent systems, building upon the concept of agent hierarchy. Three distinct types of workflow agents are introduced:
-
Sequential Agents:
- Mechanism: These agents operate like an "assembly line," where each sub-agent runs in a predefined, fixed order. Results from one sub-agent are passed along to the next in the sequence.
- Use Case Example: Ideal for multi-step processes such as fetching data, followed by data cleaning, then analysis, and finally summarization. Each step is dependent on the completion and output of the previous one.
-
Parallel Agents:
- Mechanism: Functioning like a "manager assigning tasks to three employees all at once," parallel agents enable the simultaneous execution of independent tasks.
- Use Case Example: Highly effective for scenarios requiring concurrent operations, such as fetching data from multiple different APIs simultaneously, where the order of fetching does not impact the others.
-
Loop Agents:
- Mechanism: These agents are designed for iterative processes, akin to "debugging again and again until it works." They run tasks repeatedly until a specific condition is met (e.g., a desired outcome is achieved) or a predefined maximum number of iterations is reached.
- Application: Useful for refinement processes, optimization, or tasks requiring repeated attempts until a success criterion is satisfied.
Agent Communication Mechanisms: Enabling Collaboration
Beyond hierarchical structures and workflow patterns, ADK provides three primary mechanisms for agents to communicate and interact with each other, fostering collaboration and flexibility.
-
Shared Session State:
- Concept: This mechanism is analogous to a "shared whiteboard." Agents can write their results or relevant information to a common, accessible state, and other agents can then read from this shared state.
- Technical Detail: The "state" acts as a shared memory or context that persists across agent interactions within a session.
- Example: An LLM agent can save its generated output to the shared state, allowing another agent to subsequently pick up and process that output.
-
LLM-driven Delegation:
- Concept: This is a more intelligent communication method where a "coordinating agent" (often powered by a Large Language Model, LLM) acts like a "CEO." It analyzes an incoming request and intelligently decides which specific sub-agent is best suited to handle the task, then delegates the request accordingly.
- Example: If the coordinating agent receives a request like "generate an invoice," it will route this request to a specialized "billing agent" within the system. This mechanism allows for dynamic and context-aware task distribution.
-
Explicit Invocation (Agent as a Tool):
- Concept: In this mechanism, one agent can call another agent directly, treating it like a "function" or a specialized "tool," rather than interacting with it as a sub-agent within its direct hierarchy. The target agent is "wrapped as a tool." The parent agent explicitly decides when and if to invoke this tool.
- Example: A parent agent performing complex analysis might need to perform mathematical calculations. Instead of managing a calculator as a permanent sub-agent, it can "call a calculator agent as a tool" whenever a math operation is required.
- Distinction from Sub-agents:
- Sub-agent: An integral part of an agent's organizational chart, always managed by its parent agent.
- Agent as a Tool: Functions like "bringing in a consultant." It is not part of the core hierarchy but is invoked on demand for specific, specialized tasks. This provides flexibility without cluttering the primary organizational structure.
Synthesis and Conclusion
The combination of workflow agents and communication mechanisms in ADK significantly enhances the capabilities of multi-agent systems. Workflow agents—sequential, parallel, and loop—provide essential organizational patterns for structuring complex tasks. Concurrently, the three communication mechanisms—shared session state, LLM-driven delegation, and explicit invocation—enable agents to collaborate effectively and flexibly. Together, these features ensure that multi-agent systems are not only well-structured but also highly collaborative and adaptable to diverse operational requirements. This comprehensive approach allows for the creation of sophisticated and intelligent agent-based solutions.
Chat with this Video
AI-PoweredLoad the transcript when you're ready to chat so the initial page stays lighter.
Related Videos

How the hometown humiliation of Putin marks a turning point for Ukraine | DW News
DW News

Shocking video shows moment paramedics are hit by Israel in 'double-tap' strike
Sky News

Putin Xi, To Catch a Castro, Red Carpet Rebellion • FRANCE 24 English
FRANCE 24 English

Trump's supporters furious over Trump smartphone scam.
ABC News In-depth

Nvidia Crushes Earnings again — What Jensen Huang sees next for AI
CGTN America

Samsung union suspends strike after reaching tentative pay deal • FRANCE 24 English
FRANCE 24 English

OH SH*T! The Banks are Dumping AI Loans!
Steven Van Metre