跪拜 Guibai
← All articles
Agent · Claude · AI Programming

Four Agent Orchestration Patterns That Actually Ship

By plainGeek ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

These four patterns solve the reliability ceiling that makes single-pass agent output untrustworthy for production. They give developers composable, low-cost primitives for multi-perspective review, false-positive suppression, and exhaustive search — the difference between a demo and something you can ship.

Summary

Single-agent passes miss too much. Quality Gate runs parallel dimension-specific reviews (tech, style, readability) on cheap models, then feeds all feedback into one synthesizer agent that resolves conflicts and revises. Batch Production pipelines the same topic through separate audience tracks — beginner, experienced dev, manager — each with its own research, outline, and draft stages, none blocking the others.

Review-and-Verify tackles false positives head-on: four parallel reviewers produce structured findings, JS deduplication removes overlaps, then each unique finding gets its own agent in a pipeline that tries to refute it; only confirmed issues survive. Loop-Until-Dry handles open-ended investigations like hardcoded-path hunting by cycling through strategies until two consecutive rounds yield nothing new, feeding known results back to prevent repeats.

The patterns compose freely — Review-and-Verify already combines parallel and pipeline — and the decision heuristic is plain: independent subtasks use parallel, same multi-step flows use pipeline, quality checks combine both, verification adds dedup and refutation, and unknown-total tasks loop.

Takeaways
Quality Gate splits review into parallel dimension-specific checks on cheap models (haiku), then feeds all feedback to a single synthesizer agent that resolves conflicts and revises.
Batch Production uses pipeline, not parallel, so each audience track proceeds through its own multi-stage flow without waiting on others; `.then()` carries audience context forward.
Review-and-Verify deduplicates findings in plain JS, then assigns each unique finding its own agent in a pipeline to attempt refutation — 'uncertain counts as FALSE' is the key to low false positives.
Loop-Until-Dry cycles through different search strategies each round and stops only after two consecutive rounds with zero new findings, preventing single-round misses.
The selection heuristic: independent subtasks → parallel; same multi-step process → pipeline; post-writing check → Quality Gate; verify findings → Review-and-Verify; unknown total → loop-until-dry.
Patterns compose: Review-and-Verify already layers parallel review, JS dedup, and pipeline verification together.
Conclusions

The false-positive problem in agent code review is structural, not a prompt-tuning issue — a single reviewer has no incentive to doubt itself, so an adversarial verification step is the only way to suppress noise.

Loop-Until-Dry's 'two consecutive dry rounds' stopping condition is a pragmatic convergence heuristic that costs almost nothing and prevents premature termination from a single unlucky round.

Offloading deduplication to deterministic JS instead of an LLM call is a design instinct that keeps cost and latency low while avoiding nondeterministic misses — a pattern worth applying anywhere an agent pipeline touches structured data.

The Batch Production pattern exposes a subtle pipeline-vs-parallel trap: parallel would run all stages for all audiences simultaneously, losing per-audience context; pipeline preserves the sequential dependency within each track while still running tracks concurrently.

Concepts & terms
Quality Gate
An orchestration pattern where multiple agents review output along independent dimensions in parallel, then a single synthesizer agent resolves conflicting feedback and produces the final revision.
Batch Production
A pipeline pattern that processes the same input through separate audience-specific tracks concurrently, each track running its own multi-stage workflow (research → outline → draft) without blocking others.
Review-and-Verify
A two-phase pattern: parallel multi-dimensional review produces structured findings, JS deduplication removes overlaps, then each unique finding gets its own adversarial verification agent in a pipeline; only confirmed issues survive.
Loop-Until-Dry
A while-loop pattern for open-ended search tasks where the total number of targets is unknown. Each round uses a different strategy, and the loop exits only after N consecutive rounds produce zero new findings.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗