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
| Field | Type | Required | Description |
|---|---|---|---|
agents | list | Yes | Agents participating in the group |
mode | identifier | No | debate, consensus, or open (default: open) |
rounds | number | No | Maximum number of discussion rounds |
judge | identifier | No | Agent that makes the final decision (debate mode) |
topic | string | No | The subject of discussion |
outputs | list | No | Structured 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
agentblocks in the topology. - The
judgeagent should not be listed in theagentsfield — it is a separate role. - Use
roundsto cap discussion length and control costs. - Debate mode requires a
judge. Consensus mode does not. - Groups work well with the
debateandconsensustopology patterns.