agent-patterns

critic-pair

flowchart TD
    Input([Task input]) --> Proposer[Proposer agent]
    Proposer --> Challenger[Challenger agent]
    Challenger --> Judge[Judge agent]
    Judge --> Verdict{ACCEPTED?}
    Verdict -- yes --> Done([Return proposal])
    Verdict -- no --> Escalate([Escalate with critique])

Two agents play adversarial roles before a result is accepted. The proposer produces a solution; the challenger actively tries to break it. A judge makes the final call.

How it works

  1. The proposer agent produces an implementation for the task.
  2. The challenger agent receives the proposal and tries to find every flaw: bugs, edge cases, security issues, performance problems.
  3. The judge agent evaluates both and responds with ACCEPTED or REJECTED. If rejected, the critique is returned as structured feedback.

When to use

When not to use

Trade-offs

   
Pro Surfaces flaws that a non-adversarial reviewer skips
Pro Produces a structured critique even when rejected — useful as input to a fix loop
Con Three sequential agent calls; 3× latency and cost of a single-agent review
Con All three roles run on the same model here: blind spots are correlated, and the challenger misses what the proposer missed. A different model or a stronger effort for the challenger buys real diversity, at a cost
Con Challenger can hallucinate flaws that don’t exist, causing false rejections

Failure modes