← All tutorials
Google Agent Patterns

Google's agent design patterns β€” choosing the shape

Google Cloud's guide Choose a design pattern for your agentic AI system organizes multi-agent designs around one question: who decides the workflow path? When your code decides, the flow is predetermined and predictable; when the model decides, it's dynamic and adaptive.

predetermined route β€” code decides β€” sequential Β· parallel Β· loop vs dynamic route β€” AI decides β€” coordinator Β· hierarchical Β· swarm
The trade-off. Predetermined patterns give you control and repeatability; dynamic patterns give you adaptability for ambiguous, open-ended problems β€” at the cost of predictability. Match the pattern to how much the task can be planned in advance.

The framing  Who decides the route?

Every pattern is a way to arrange one or more agents. The organizing axis is control: does a developer wire the sequence, or does an LLM route at runtime? Start on the deterministic side and move toward autonomy only as the problem demands it.

Predetermined (code decides)Dynamic (AI decides)
ControlHigh, repeatableLower, adaptive
Best forWell-understood, structured tasksAmbiguous, open-ended tasks
PatternsSequential Β· Parallel Β· LoopCoordinator Β· Hierarchical Β· Swarm

Code decides  Predetermined patterns

Sequential a fixed pipeline

Shape Agents/steps run one after another; each output feeds the next.

Use when The task is a repeatable pipeline with clear, ordered stages (e.g. extract β†’ transform β†’ summarize).

Parallel fan-out, then combine

Shape Independent agents run concurrently; a step merges their results.

Use when Subtasks are independent (speed) or you want diverse perspectives gathered at once.

Loop iterate to a condition

Shape Repeat a step until an exit condition is met (a quality bar, a max count).

Use when Output improves with iteration and you can define "good enough" (e.g. refine until a score passes).

AI decides  Dynamic patterns

Here the routing is chosen at runtime by a model. The three shapes differ in who holds authority β€” a central router, a manager hierarchy, or a flat peer group:

Coordinator, hierarchical and swarm topologies Coordinator: one router dispatches to several workers. Hierarchical: an orchestrator delegates to managers, which delegate to workers. Swarm: peer agents connect to and hand off to each other. Coordinator Hierarchical Swarm router A B C routes to a specialist orch managers β†’ workers A B C D peers hand off

Coordinator router / dispatcher

Shape A central agent classifies each request and routes it to the right specialist agent.

Use when Inputs vary and are best handled by different specialists (adaptive routing).

Hierarchical orchestrator β†’ workers

Shape A top orchestrator decomposes the goal and delegates to sub-agents (sometimes via mid-level managers), then integrates results.

Use when The problem is open-ended and benefits from a manager coordinating specialized workers.

Swarm decentralized peers

Shape No central boss β€” peer agents collaborate and hand off control to whichever is best suited next.

Use when Complex problems benefit from emergent collaboration or debate among equals.

Overlays  Cross-cutting patterns

These apply on top of either side of the axis:

πŸ‘€ Single-agent

One capable agent with tools handles a moderately complex task β€” no delegation. The simplest starting point.

πŸ” Review & critique

A generator agent paired with a critic that validates output β€” for accuracy and compliance (a.k.a. reflection).

βœ‹ Human-in-the-loop

Insert human approval at high-stakes steps β€” works with any pattern for safety and control.

Runnable scaffolds. This repo's experiments implement all of these β€” single-agent, sequential, parallel, loop, review & critique, coordinator, hierarchical, swarm, human-in-the-loop β€” on the LangChain/LangGraph stack.

Choosing a pattern

If the task is…PatternRoute
Moderate, single-scope, tool-usingSingle-agentβ€”
A fixed, ordered pipelineSequentialPredetermined
Independent subtasks / many perspectivesParallelPredetermined
Iterative refinement to a conditionLoopPredetermined
Varied inputs needing adaptive routingCoordinatorDynamic
Open-ended, decompose-and-delegateHierarchicalDynamic
Emergent collaboration / debateSwarmDynamic
High-stakes / needs approvals+ Human-in-the-loopAny
Rule of thumb. Prefer the most deterministic pattern that solves the problem; reach for dynamic routing only when the task is genuinely ambiguous. Compose freely β€” e.g. a hierarchical orchestrator whose workers run sequential pipelines, with human approval on the risky step.

Cheat sheet

QuestionShort answer
The organizing question?Who decides the route β€” your code (predetermined) or the model (dynamic)?
Predetermined patterns?Sequential, Parallel, Loop.
Dynamic patterns?Coordinator (router), Hierarchical (orchestrator→workers), Swarm (peers).
Swarm vs Hierarchical?Swarm has no central boss; hierarchical has an orchestrator/managers.
Overlays?Single-agent, review & critique, human-in-the-loop.
Core advice?Prefer the most deterministic pattern that works.

Knowledge check

Six questions on Google's agent design patterns. Pick an answer for each, then check your score.

1. What is the organizing question behind Google's taxonomy?

2. Which are the predetermined patterns?

3. A central agent classifies each request and routes it to a specialist. Which pattern?

4. What distinguishes Swarm from Hierarchical?

5. Which overlay adds safety by inserting approvals at high-stakes steps?

6. What's the recommended default posture?

Next steps

πŸ” Anthropic agent architectures

The other taxonomy β€” workflows vs agents and the agent loop.

🧰 Agent Development Kits

Build these patterns β€” Google ADK's workflow agents map directly onto them.

πŸ§ͺ Runnable experiments

Scaffolds for every pattern β€” coordinator, hierarchical, swarm & more.

πŸ““ All tutorials

The hub β€” LLMs, agents, protocols, cloud & more.