BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Google’s Eight Essential Multi-Agent Design Patterns

Google’s Eight Essential Multi-Agent Design Patterns

Listen to this article -  0:00

Google recently published a guide outlining eight essential design patterns for multi-agent systems, ranging from sequential pipelines to human-in-the-loop architecture. The guide provides concrete explanations of each pattern along with sample code for Google's Agent Development Kit.

Creating complex, scalable agentic applications requires the same disciplined approach used for other software systems, Google says, because relying on a single entity creates a bottleneck that can degrade performance and debugging.

Reliability comes from decentralization and specialization. Multi-Agent Systems (MAS) allow you to build the AI equivalent of a microservices architecture. By assigning specific roles (a Parser, a Critic, a Dispatcher) to individual agents, you build systems that are inherently more modular, testable, and reliable.

Google has identified eight fundamental architectures, or patterns, that help developers design multi-agent systems in a structured way using the three foundational execution patterns provided by the Agent Development Kit: sequential, loop, and parallel.

The simplest pattern is the sequential pipeline, in which agents are arranged like an assembly line, with each agent passing its output to the next. This pattern "is linear, deterministic, and refreshingly easy to debug because you always know exactly where the data came from", Google says.

A slight variation of the sequential pipeline is the coordinator/dispatcher pattern, in which one agent acts as a decision maker, receiving a request and dispatching it to a specialized agent further down the line.

The parallel fan-out/gather pattern is useful when multiple agents can operate simultaneously, each with its own specific responsibilities. For example, to review a PR, a primary agent can spawn parallel agents to handle specific tasks, such as enforcing style, auditing security, and analyzing performance. The parallel agent feeds their output into a synthesizer agent, which aggregates outputs and approves or rejects the PR.

For more complex scenarios, developers can organize their agents using a hierarchical decomposition, in which high-level agents break down complex goals into subtasks and delegate them to other agents.

When output reliability is critical, the generator and critic pattern can be used, in which one agent is responsible for content creation while another validates it and, optionally, provides feedback to the former so it refines its output iteratively.

A generalization of the generator and critic is the iterative refinement pattern, where the output produced by a generator agent is submitted to a critique agent and a refiner agent, which work together iteratively to improve the original output.

There are cases where decisions must be made that have irreversible effects or carry significant consequences, such as executing financial transactions, deploying code to production, or taking action based on sensitive data. In those cases, the human in the loop pattern may be the solution, in which an approval tool agent can pause execution when required and wait for a human reviewer to approve or deny the suggested outcome.

Finally, the composite pattern allows for combining any of the other patterns, such as using a coordinator to route requests, a parallel agent to speed up processing, and a generator and critic loop to ensure output quality.

As mentioned, Google's guide includes detailed diagrams and code snippets showing how to use the Agent Development Kit to implement all these patterns. Do not miss it for the full details.

For an alternative take on using the ADK for multi-agent systems, check out Hangsik Shin's guide.

About the Author

Rate this Article

Adoption
Style

BT