
Why should we use Agentic patterns?
Monolithic AI agents do not scale effectively and often create significant system bottlenecks, much like monolithic software applications. Relying on a single, all-in-one agent to handle complex instructions turns it into a "Jack of all trades, master of none." As the agent's responsibilities and instruction complexity increase, its adherence to specific rules degrades, error rates compound, and "hallucinations" increase. Furthermore, single agents increase debugging costs—if the agent fails, developers are forced to tear down the entire prompt to locate the bug.
Multi-agent patterns matter because they solve these issues through decentralisation and specialisation. By implementing these patterns, developers can:
- Build the AI equivalent of a microservices architecture: Assign individual agents highly specific roles (such as a Parser, Critic, or Dispatcher) rather than relying on one generalist.
- Improve modularity and testing: Create systems that are inherently more testable, reliable, and significantly easier to debug.
- Overcome performance limits: Break through the limits that naturally occur when relying on a single entity to execute complex workflows.
7 Core Patterns
1. Sequential Pipeline Pattern
Let’s start with the bread and butter of agent workflows. Think of this pattern as a classic assembly line where Agent A finishes a task and hands the baton directly to Agent B. It is linear, deterministic, and refreshingly easy to debug because you always know exactly where the data came from. In ADK, the SequentialAgent primitive handles the orchestration for you. The secret sauce here is state management: simply use the output_key to write to the shared session.state so the next agent in the chain knows exactly where to pick up the work.
Real-world example: This is your go-to architecture for data processing pipelines. For processing raw documents, a Parser Agent turns a raw PDF into text, an Extractor Agent pulls out structured data, and a Summarizer Agent generates the final synopsis.

2. Coordinator/Dispatcher Pattern
Sometimes you don't need a chain; you need a decision maker. In this pattern, a central, intelligent agent acts as a dispatcher. It analyzes the user's intent and routes the request to a specialist agent best suited for the job. This relies on LLM-driven delegation. You simply define a parent CoordinatorAgent and provide a list of specialist sub_agents. The ADK's AutoFlow mechanism takes care of the rest, transferring execution based on the descriptions you provide for the children.
Real-world example: This is ideal for complex customer service bots where you might need to send a user to a "Billing" specialist for invoice issues versus a "Tech Support" specialist for troubleshooting.

3. Parallel Fan-Out/Gather Pattern
Speed matters. If you have tasks that don't depend on each other, why run them one by one? In this pattern, multiple agents execute tasks simultaneously to reduce latency or gain diverse perspectives. Their outputs are then aggregated by a final "synthesizer" agent. The ParallelAgent in ADK should be used to run sub-agents simultaneously. Be aware that although these agents operate in separate execution threads, they share the session state. To prevent race conditions, make sure each agent writes its data to a unique key.
Real-world example: This is ideal for something like Automated Code Review. Instead of running checks sequentially, you can spawn a "Security Auditor," a "Style Enforcer," and a "Performance Analyst" to review a Pull Request simultaneously. Once they finish, a "Synthesizer" agent combines their feedback into a single, cohesive review comment.

4. Hierarchical Decomposition
Sometimes a task is too big for one agent context window. High-level agents can break down complex goals into sub-tasks and delegate them. Unlike the routing pattern, the parent agent might delegate just part of a task and wait for the result to continue its own reasoning. You can treat a sub-agent as a tool here. By wrapping an agent in AgentTool, the parent agent can call it explicitly, effectively treating the sub-agent's entire workflow as a single function call.
Real-world example: Think of a high-level report writing system. A ReportWriter agent doesn't do the research itself; it delegates to a ResearchAssistant, which in turn manages WebSearch and Summarizer tools to gather information before passing it back up.

5. Generator and Critic
Generating high-quality, reliable output often requires a second pair of eyes. In this pattern, you separate the creation of content from the validation of content. One agent acts as the Generator, producing a draft, while a second agent acts as the Critic, reviewing it against specific, hard-coded criteria or logical checks. To implement this in ADK, you separate concerns into two specific primitives: a SequentialAgent that manages the draft-and-review interaction, and a parent LoopAgent that enforces the quality gate and exit condition. If the review passes, the loop breaks, and the content is finalized. If it fails, specific feedback is routed back to the Generator to produce a compliant draft.
Real-world example: This is incredibly useful for code generation that needs syntax checking or content creation requiring compliance review. For example, a generator produces a draft of a SQL query, and a critic checks if it is valid SQL, routing error details back to fix it if it fails.

6. Iterative Refinement
Great work rarely happens in a single draft. In this pattern, agents enter a cycle of generating, critiquing, and refining until the output meets a specific quality threshold. Unlike the Generator and Critic pattern, which focuses on correctness (Pass/Fail), this pattern focuses on qualitative improvement. This pattern is implemented using the LoopAgent. While you can set a hard limit using max_iterations, ADK also allows an agent to signal early completion by triggering escalate=True within its EventActions if the quality threshold is met early.
Real-world example: Just like a human writer needs to revise, polish, and edit, sometimes your agents need a few attempts to get an answer exactly right. A Generator creates a rough draft, a Critique Agent provides optimization notes, and a Refinement Agent polishes the output to be more efficient based on those notes.

7. Human-in-the-Loop
AI Agents are powerful, but sometimes you need a human in the driver's seat for critical decision-making. In this model, agents handle the groundwork, but a human must authorize high-stakes actions - specifically those that are irreversible or carry significant consequences. ADK allows you to implement this via custom tools. An agent can call an approval_tool which pauses execution or triggers an external system to request human intervention.
Real-world example: This includes executing financial transactions, deploying code to production, or taking action based on sensitive data, ensuring safety and accountability. A Transaction Agent processes routine work, but pauses execution to wait for a Human Reviewer when a high stakes check is triggered.

Summary
- Decentralization and Specialization: Every pattern avoids the "monolithic" approach of relying on a single, all-in-one agent. Because single agents tasked with too much become a "Jack of all trades, master of none" subject to compounded errors and hallucinations, all these patterns assign highly specific roles (such as a parser, dispatcher, or critic) to individual agents.
- AI Microservices Architecture: All of the patterns are designed to help you build the AI equivalent of a microservices architecture, breaking complex workflows down into smaller, targeted tasks.
- Modularity and Reliability: By dividing up responsibilities, every pattern inherently creates a system that is more modular, testable, reliable, and significantly easier to debug than a single giant prompt.
- Shared State Management: Regardless of whether the agents operate in a linear chain, a parallel swarm, or a refinement loop, they all rely on passing data through a shared state. In the Google Agent Development Kit (ADK), they use
session.stateas a shared "whiteboard" and rely on descriptiveoutput_keyparameters so that downstream agents know exactly where to pick up the data.- ADK Orchestration: All of the patterns are structured to be built using specific Google Agent Development Kit (ADK) primitives—such as the
SequentialAgent,ParallelAgent, orLoopAgent—to handle the orchestration and hand-offs between the specialized agents.
Composite Pattern
Real-world enterprise applications rarely fit into a single box. You will likely combine these patterns to build production-grade applications.
Real-world example: A robust Customer Support system might use a Coordinator to route requests. If the user has a technical issue, that branch might trigger a Parallel search of documentation and user history. The final answer might then go through a Generator and Critic loop to ensure tone consistency before being sent to the user.

Reference
https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/