AgenTopology

Debate

Peer agents challenge each other's reasoning to reach a stronger consensus

Debate

The debate pattern puts two or more agents in opposition. Each agent argues a position, challenges the other's reasoning, and a judge agent synthesizes the strongest arguments into a final conclusion. This produces more robust analysis than any single agent could achieve alone.

When to Use Debate

  • Investment analysis — bull vs. bear cases for a stock or strategy
  • Risk assessment — optimistic vs. pessimistic scenario planning
  • Policy evaluation — arguments for and against a proposed change
  • Architecture decisions — competing design approaches with trade-off analysis
  • Any decision where exploring opposing viewpoints leads to better outcomes

Debate is the right choice when you want to stress-test reasoning. If your agents need to cooperate on a shared task rather than argue, use pipeline or fan-out.

How It Works

Agents are organized into a group block where they take turns presenting arguments. A judge agent reviews all arguments and produces a synthesis. The max modifier on flow edges controls how many debate rounds occur.

topology investment-analysis : [debate] {
  meta {
    version: "1.0.0"
    description: "Bull vs bear analysis with judge synthesis"
  }

  orchestrator {
    model: opus
    handles: [intake, final-report]
  }

  group debate-panel {
    agent bull-analyst {
      model: sonnet
      tools: [Read, WebSearch]
      prompt {
        "You argue the bullish case. Find evidence supporting the investment.
         Challenge the bear analyst's concerns directly."
      }
      outputs: { confidence: high | medium | low }
    }

    agent bear-analyst {
      model: sonnet
      tools: [Read, WebSearch]
      prompt {
        "You argue the bearish case. Find risks and evidence against the investment.
         Challenge the bull analyst's claims directly."
      }
      outputs: { confidence: high | medium | low }
    }
  }

  agent judge {
    model: opus
    tools: [Read, Write]
    prompt {
      "Review both analysts' arguments. Synthesize a balanced conclusion.
       Identify which arguments were strongest and why."
    }
    outputs: { recommendation: strong-buy | buy | hold | sell | strong-sell }
  }

  flow {
    intake -> [bull-analyst, bear-analyst]
    bull-analyst -> bear-analyst  [max 3]
    bear-analyst -> bull-analyst  [max 3]
    bull-analyst -> judge
    bear-analyst -> judge
    judge -> final-report
  }
}

Key Concepts

Group Blocks

The group block organizes debating agents together. This signals to AgenTopology that these agents interact as peers rather than in a hierarchy:

group debate-panel {
  agent bull-analyst { }
  agent bear-analyst { }
}

Debate Rounds

Back-and-forth flow edges with max modifiers control the number of argument rounds:

flow {
  bull-analyst -> bear-analyst [max 3]
  bear-analyst -> bull-analyst [max 3]
}

Each analyst sees the other's previous argument and responds to it, sharpening the analysis over multiple rounds.

Judge Synthesis

After the debate rounds complete, both agents' final arguments flow to the judge:

flow {
  bull-analyst -> judge
  bear-analyst -> judge
  judge -> final-report
}

The judge has access to the full debate history and produces a synthesized conclusion.

Flow Diagram

              +--> bull-analyst <--+
              |        |          |
intake -------+        +----------+  (3 rounds)
              |        |          |
              +--> bear-analyst <-+
                       |
                       v
                     judge -> final-report

Combining with Other Patterns

Debate works well with:

  • pipeline — use debate as one phase in a larger pipeline (e.g., research, then debate, then write)
  • human-gate — require human approval of the judge's conclusion before acting on it
  • supervisor — let an orchestrator decide whether a topic warrants debate or can be handled by a single agent

On this page