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.
The full canvas, before you import it
Click any node to see its config.
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
- chatInput receives the code change (diff, PR description, before/after snippet)
- architectAgent (orchestrator) classifies the change and calls all three specialists in parallel
- reasonerAgent identifies the 2–3 highest-leverage review angles for this specific change
- implementerAgent generates minimal test or reproduction code to verify the PR's claims
- reviewerAgent detects framing tensions between the PR description and the diff
- architectAgent integrates all specialist evidence into a structured verdict
Verdict format
| Output | Meaning |
|---|---|
VERDICT: request_changes | Critical or high-severity concern found — block until addressed |
VERDICT: discuss | Low-to-medium concerns or specialist disagreement — confirm before merging |
VERDICT: approve | No 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:
| Agent | Mode | What it prevents |
|---|---|---|
| reasonerAgent | reasoning | Premature stopping, symptom-as-cause, surface-level analysis |
| implementerAgent | code | Hallucinated APIs, wrong signatures, missing edge cases |
| reviewerAgent | anti-deception | Sycophancy, 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)
- Get a free API key at ejentum.com/pricing (100 calls free tier)
- In Heym → Credentials → + New Credential
- Name:
EjentumLogicApi(exact name — agents reference this by name) - Type: Authorization Bearer Token
- Token: paste your Ejentum key
- Name:
Step 2 — LLM credentials
Attach your LLM credential to all four agent nodes. For maximum adversarial quality, use different model families per agent:
| Agent | Recommended model |
|---|---|
| architectAgent | anthropic/claude-3.7-sonnet:thinking (extended thinking) |
| reasonerAgent | qwen/qwen3-max-thinking or any Qwen reasoning model |
| implementerAgent | z-ai/glm-5.1 (temperature 0) |
| reviewerAgent | google/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
- 1Click Import → Copy JSON on this page.
- 2Open your Heym and navigate to a workflow canvas.
- 3PressCmd+V/Ctrl+V— nodes appear instantly.
- 4Add your API keys in the node config panels and click Run.
Discover more automations
- Multi-AgentOrchestrator → Research & Writer AgentsOrchestrator agent delegates to a Research sub-agent and a Writer sub-agent, then surfaces a polished draft for newsletters, blog posts, or digests.
- Multi-AgentSlack Orchestrator + Triage Sub-AgentsOrchestrator agent classifies incoming Slack messages and delegates to an UrgentAgent or NormalAgent sub-agent, each with its own posting logic.
- AIBatch LLM Status TrackerSend an array through the OpenAI Batch API, branch on live status updates, and collect the final per-item results.
- AutomationIMAP Support Inbox TriageWatch a shared mailbox, summarize incoming support email, and route urgent messages to Slack.
- IntegrationJina Web FetcherFetch clean, LLM-ready text from any URL using the Jina Reader API.
- AutomationCursor Post NotifierMonitor the Cursor blog on a schedule and Slack-notify your team when a new post goes live.
- AIGemini Image CreatorGenerate images from a text prompt using Gemini's native image output.
- AIPDF / DOCX Translation AgentTranslate the full text of any uploaded document using an AI agent.