Adversarial PR Review
An orchestrator pulls a pull request from GitHub, a primary reviewer proposes findings, and a challenger on a different model disputes them — arbitrated into one calibrated approve, comment, or request-changes decision.
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.
5 nodes · Free & source-available
Adversarial PR Review
A multi-agent, adversarial pull request reviewer. An orchestrator pulls the real change from GitHub, delegates to a primaryReviewer that proposes findings, then to a challenger on a different model vendor that disputes those findings and hunts for missed bugs. The orchestrator arbitrates both sides into one calibrated decision — approve, comment, or request changes — instead of dumping every issue a single model noticed.
Built from the pipeline in our guide: AI Code Review: A Multi-Agent, Adversarial Guide.
What this workflow does
- prInput takes a pull request URL (or POST
{"text":"<pr-url>"}to the workflow) - orchestrator uses the GitHub MCP to read the PR diff, commits, comments, and CI status, plus a Sequential Thinking MCP to reason step by step
- primaryReviewer (Claude Opus) returns structured findings, each with a severity from S0–S4, a confidence score, a file and line, and a suggested fix
- challenger (GPT, a different vendor) critiques every finding — accept, reject, or needs-more-evidence — flags wrong severities, and adds high-impact issues the reviewer missed
- The orchestrator merges both sides, drops rejected findings, applies agreed severity changes, and writes a final decision plus a suggested PR comment to finalReview
Why adversarial
A lone reviewer is confident, agreeable, and biased toward quick wins, so it both invents problems and misses real ones. Giving the challenger the explicit job of disputing the primary reviewer — on a different model so they do not share blind spots — filters weak findings and surfaces what a single pass would miss. The structure, not any single model, is what improves the output.
Use cases
- Self-hosted PR review that keeps proprietary code on your own infrastructure
- High-stakes merges where a missed bug costs more than the extra tokens
- Cutting false-positive noise from a single-agent reviewer
Setup
- Add an LLM credential to orchestrator, primaryReviewer, and challenger — mix vendors so the challenger differs from the reviewer
- Provide a GitHub token: the GitHub MCP reads it from the global variable
githubPat - Replace
your-github-usernamein the orchestrator prompt with your handle - (Optional) Add web-search and website-loader sub-workflows to the orchestrator for external context (CVEs, library status, linked RFCs)
- Run on a real PR, then open the Traces tab to see every tool call, each sub-agent, tokens and latency, and where the two agents disagreed
Notes
The reviewer and challenger return structured JSON; the orchestrator's merge policy decides the verdict (any surviving S0/S1 finding means request changes). Swap models per role to trade cost against depth.
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.
- Multi-AgentEjentum Code ReviewerA 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.
- Multi-AgentBlood Panel Triage TeamOrchestrator runs a deterministic 12-marker panic-value gate, then fans out three cross-lab sub-agents to interpret labs, push doctor questions, and enumerate differentials.
- AIHITL Support Reply AgentDraft a customer-facing support response, pause for human approval, then continue with the reviewed reply.
- IntegrationReddit Subreddit GET Tool CallLet an Agent call a no-key HTTP GET tool that fetches hot posts from a subreddit JSON feed.
- 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.