AgenTopology

Groups

Define group chat and debate patterns for multi-agent deliberation

Groups

The group block defines a set of agents that collaborate through open discussion rather than a fixed flow. Groups are used for debate, consensus-building, and collaborative problem-solving.

Basic Syntax

group architecture-review {
  agents: [frontend-lead, backend-lead, security-lead]
  mode: debate
  rounds: 3
  judge: tech-lead
}

Field Reference

FieldTypeRequiredDescription
agentslistYesAgents participating in the group
modeidentifierNodebate, consensus, or open (default: open)
roundsnumberNoMaximum number of discussion rounds
judgeidentifierNoAgent that makes the final decision (debate mode)
topicstringNoThe subject of discussion
outputslistNoStructured outputs from the group

Modes

Open

Agents discuss freely. No structured turn-taking or resolution mechanism:

group brainstorm {
  agents: [creative, analyst, engineer]
  mode: open
  topic: "Feature ideas for Q3"
  rounds: 5
}

Debate

Agents argue positions. A judge agent synthesizes the final conclusion:

group design-debate {
  agents: [advocate-monolith, advocate-microservices]
  mode: debate
  rounds: 3
  judge: architect
  topic: "System architecture approach"
  outputs: [decision, rationale]
}

Each agent presents their case, responds to the other, and the judge renders a verdict after the rounds complete.

Consensus

Agents iterate toward agreement. The group continues until all agents agree or rounds expire:

group priority-setting {
  agents: [product, engineering, design]
  mode: consensus
  rounds: 4
  topic: "Sprint priorities"
  outputs: [priorities, dissenting-views]
}

Using Groups in Flow

Reference a group in the flow block just like an agent:

topology review-system : [debate] {
  agent researcher    { model: sonnet  tools: [Read, WebSearch] }
  agent pro-side      { model: sonnet  role: "Argues for the proposal" }
  agent con-side      { model: sonnet  role: "Argues against the proposal" }
  agent judge         { model: opus    role: "Renders final verdict" }
  agent writer        { model: sonnet  tools: [Write] }

  group proposal-review {
    agents: [pro-side, con-side]
    mode: debate
    rounds: 3
    judge: judge
    outputs: [verdict, reasoning]
  }

  flow {
    researcher -> proposal-review -> writer
  }
}

Tips

  • Group participants must each be declared as agent blocks in the topology.
  • The judge agent should not be listed in the agents field — it is a separate role.
  • Use rounds to cap discussion length and control costs.
  • Debate mode requires a judge. Consensus mode does not.
  • Groups work well with the debate and consensus topology patterns.

On this page