The single-agent model is dead. Long live the swarm. A new tutorial from Mohamed Bal on DEV.to drops a complete, open-source lab for building a multi-agent code reviewer using DEVUP AI, TypeScript, and the OpenAI Agents SDK. The project isn't just about slapping a second prompt on a model; it's about architectural separation. By splitting the review pipeline into a correctness reviewer, a test reviewer, and an adjudicator, the tutorial demonstrates how to catch subtle regressions that a single pass often misses.

The Pricing Regression That Broke the Review

The tutorial opens with a brutal example of why single-pass reviews fail. It presents a pricing function where a 20% discount contract was represented as '20'. A naive refactor changed the calculation logic, causing a 10000-cent subtotal with a 20% discount to return -190000 instead of the expected 8000. The existing assertion assert.equal(discountedTotal(10000, 0), 10000) passed because it only tested zero discount. The multi-agent pipeline is designed to catch this by having one agent analyze behavioral correctness and another specifically hunt for missing test coverage on nonzero inputs.

Deterministic Orchestration, Not Manager Models

Zero-cool here: I hate 'magic' orchestration. This tutorial gets it right by using code-controlled scheduling instead of relying on a manager model to decide the flow. The pipeline uses Promise.allSettled to run the correctness and test reviewers in parallel. Once both finish, their outputs are validated locally against the source snapshot before being passed to an adjudicator agent. This adjudicator can only keep, drop, or question existing candidates; it cannot invent new ones. This constraint prevents the model from hallucinating issues that don't exist in the code diff.

Evidence Validation Outside the Model

The most hacker-friendly feature is the strict evidence validation. Every candidate finding must cite a specific path, line range, and exact quote from the source. The system verifies these citations against the frozen snapshot using SHA-256 hashes and local checks. If a model claims a bug exists on line 42 but the quote doesn't match the source at line 42, the candidate is rejected before a human ever sees it. This 'trust but verify' approach keeps the AI honest and prevents the report from becoming a wall of text.

Key Takeaways

  • The project is built on Node.js 24.19.0 with erasable TypeScript syntax, allowing direct execution via node.
  • It includes a 'SCRIPTED DEMO' mode that makes zero API requests, allowing developers to inspect the pipeline logic without burning credits.
  • The tool surface is strictly read-only: agents can list files, read diffs, and read lines, but cannot edit the repo or run code.
  • The tutorial explicitly avoids claiming a 'better' result without a benchmark, providing a scoring script for manual evaluation instead.

The Bottom Line

This isn't just another 'wrap a prompt in a function' tutorial. It's a serious look at how to engineer reliability into AI agents by constraining their outputs and validating their evidence locally. If you're building agent pipelines, study how this project separates scheduling from judgment.