The multi-agent loop pattern repeatedly executes a sequence of specialized subagents until a specific termination condition is met.1

Diagram
Open the interactive version here to pan and zoom.
How it works
A loop workflow agent drives the cycle. Like the other workflow agents behind the sequential and parallel patterns, it runs on predefined logic rather than consulting a model for orchestration.
After the subagents finish their tasks, the loop agent evaluates whether the exit condition has been met. That condition can be a maximum number of iterations or a custom state. If it isn’t met, the sequence of subagents runs again. The evaluation doesn’t have to sit at the end — you can implement the loop so the exit condition is checked at any point in the flow.
When to use it
Use it for tasks that require iterative refinement or self-correction — generating content and having a critic agent review it until it meets a quality standard, for instance.
From the pattern-comparison guidance, the workload profile is:
- monitoring or polling tasks that repeat a predefined action, such as automated checks, until an exit condition is met,
- tolerance for unpredictable or long-running latency while waiting for that condition.
Two named implementations
The source calls out two specializations of this pattern, both of which get their own page:
- Review and critique — a generator agent produces output and a critic agent evaluates it against fixed criteria, approving, rejecting, or returning it with feedback.
- Iterative refinement — one or more agents progressively improve a result held in session state across cycles.
Trade-offs
The loop is what lets agents refine their own work and keep processing until a specific quality or state is reached, which is not achievable in a single pass.
The primary risk is an infinite loop. If the termination condition isn’t correctly defined, or the subagents never produce the state required to stop, the loop runs indefinitely — leading to excessive operational costs, high resource consumption, and potential system hangs. Designing the exit condition is the real work of this pattern.
Footnotes
-
Samantha He, “Choose a design pattern for your agentic AI system”, Google Cloud Architecture Center, last reviewed 2026-05-28. Local copy:
references/google-cloud-agentic-design-patterns.md. ↩