All templates
FeaturedMulti-Agent#Multi-Agent#Code Review#AI#Ejentum

Adversarial Code Review

A 4-agent MAS that refuses to rubber-stamp PRs: architect orchestrates three cross-lab specialists (reasoning, code, anti-deception), each backed by the Ejentum Logic API.

Workflow at a glance

The full canvas, before you import it

Click any node to see its config.

#Multi-Agent#Code Review#AI#Ejentum

Click a node to select it — same as the Heym editor; the panel shows its settings.

11 nodes · Free & source-available

Adversarial Code Review

A 4-agent multi-agent system built on cross-lab model diversity so the review's findings don't share the failure modes of any single model.

Each specialist applies a distinct cognitive harness via the Ejentum Logic API — reasoning, code, and anti-deception — so the team thinks across dimensions instead of producing the smoothed-out average that single agents tend toward.

What this is for: code review of specific changes (diffs, before/after snippets, PR descriptions). Not for general programming questions or architecture brainstorming — those are explicitly out of scope and the orchestrator declines them.

What this workflow does

  1. chatInput receives the code change (diff, PR description, before/after snippet)
  2. architectAgent (orchestrator) classifies the change and calls all three specialists in parallel
  3. reasonerAgent identifies the 2–3 highest-leverage review angles for this specific change
  4. implementerAgent generates minimal test or reproduction code to verify the PR's claims
  5. reviewerAgent detects framing tensions between the PR description and the diff
  6. architectAgent integrates all specialist evidence into a structured verdict

Verdict format

OutputMeaning
VERDICT: request_changesCritical or high-severity concern found — block until addressed
VERDICT: discussLow-to-medium concerns or specialist disagreement — confirm before merging
VERDICT: approveNo concerns — FRAMING_NOTES carries specific positive evidence
Minimal review: ...Trivial change (typo, whitespace) — no specialists called

Ejentum harness modes

Each specialist calls one mode of the Ejentum Logic API:

AgentModeWhat it prevents
reasonerAgentreasoningPremature stopping, symptom-as-cause, surface-level analysis
implementerAgentcodeHallucinated APIs, wrong signatures, missing edge cases
reviewerAgentanti-deceptionSycophancy, framing compliance, rubber-stamping

Architecture note

architectAgent has no harness and no HTTP tool. It cannot produce concerns from its own reading. Every CONCERN in the final verdict must come from a specialist's evidence. This makes the multi-agent value structurally guaranteed rather than theatrical.

Use cases

  • Code review for open-source PRs you don't fully control
  • Pre-merge review gate in self-hosted CI workflows
  • Teaching adversarial review patterns to engineering teams
  • Cross-lab model diversity demo for multi-agent architecture studies

Setup

Step 1 — Ejentum credential (required)

  1. Get a free API key at ejentum.com/pricing (100 calls free tier)
  2. In Heym → Credentials+ New Credential
    • Name: EjentumLogicApi (exact name — agents reference this by name)
    • Type: Authorization Bearer Token
    • Token: paste your Ejentum key

Step 2 — LLM credentials

Attach your LLM credential to all four agent nodes. For maximum adversarial quality, use different model families per agent:

AgentRecommended model
architectAgentanthropic/claude-3.7-sonnet:thinking (extended thinking)
reasonerAgentqwen/qwen3-max-thinking or any Qwen reasoning model
implementerAgentz-ai/glm-5.1 (temperature 0)
reviewerAgentgoogle/gemini-2.5-pro

Verification tests

Run these four inputs after setup to confirm correct behaviour:

Test 1 — Refactor with hidden semantic change: Paste a diff where a function signature adds a default=None parameter and drops the error raise. Expected: VERDICT: request_changes.

Test 2 — Trivial typo fix: "Fix typo in error message". Expected: Minimal review: typo fix.

Test 3 — Deprecation fix: logger.warn → logger.warning, same semantics. Expected: VERDICT: discuss (scope concern).

Test 4 — Out-of-scope: "What's the best way to structure a microservice?" Expected: architect declines.

FAQ

Does the architect call specialists sequentially or in parallel? In parallel — all three are delegated simultaneously.

Can I swap models for cost efficiency? Yes — use gpt-4o-mini for the specialists while keeping the orchestrator on a stronger model.

What counts as a trivial change? Typos, comment edits, whitespace-only diffs. The architect short-circuits immediately.

How to import this template

  1. 1Click Import → Copy JSON on this page.
  2. 2Open your Heym and navigate to a workflow canvas.
  3. 3PressCmd+V/Ctrl+V— nodes appear instantly.
  4. 4Add your API keys in the node config panels and click Run.
More workflow templates
View all templates