consensus
Solve divergent AI outputs by querying multiple agents in parallel and aggregating their answers into a single, unified result via voting or synthesis.
Instructions
Ask the same prompt of several ACP agents in parallel and reduce the voices.
targets is a list of {cli, model} objects or cli / cli:model strings; each runs as its own ACP
session concurrently. Omit targets, pass an empty list, pass the sentinel "all", or set
expand_all=true to fan out to every registered agent (each at its default model, capped at
max_targets); the result's skipped field explains any agent left out. Or name a saved panel (with
optional panel_overrides) to reuse a stored roster + strategy instead of targets; they are mutually
exclusive (see reload_panels). A {cli, model} target may
also carry per-seat role / label / weight / parity / stance. With a strategy other than
all-voices (unanimous | majority | plurality | weighted | parity-pair | rank, optionally
with a verdict_schema), each voice is asked for a verdict and the panel collapses to one outcome
(StrategyResult) instead of every voice. rank is a two-round protocol (F4b): every voice answers, then
ranks the OTHER answers anonymized and self-excluded, aggregated by Borda mean-rank into a rank
leaderboard with a pairwise agreement matrix and concordance; require_dissent surfaces each non-winning
position on its dissent. discount_correlated=true (F3 vote-math, opt-in) down-weights correlated votes
by model-family lineage (vendor fallback) so a panel of "one model in N CLI costumes" counts as one
effective vote under majority / plurality / weighted (each voice's lineage_weight shows it). Optional
stances (parallel to targets) steer each voice and cannot combine with the auto-expanded panel.
synthesize (defaults to synthesize_default, off
out of the box) adds a server-side combined answer (all-voices only); judge names the seat that
writes it. timeout_s applies to every voice; one failing voice is a failed result, never an aborted
panel. Consensus is read-only deliberation: a safety_mode beyond read_only (propose / write /
yolo) is refused -- there is no coherent merge of edits from several agents into one tree -- so route
write / propose work through delegate (a single agent isolated in a worktree sandbox). role names a
persona (see list_roles) prepended to the prompt every voice
receives. effort (low | medium | high | xhigh | max) asks every voice to spend more reasoning where it
has a knob; max is accepted and clamped to each agent's ceiling. time_budget_s is a wall-clock
deadline for the WHOLE panel (distinct from each voice's
timeout_s): at the deadline answered voices are kept, in-flight ones cut, and the panel aggregates over
the harvest if min_quorum usable remain (stop_reason="budget", with a rollup); below min_quorum
is BUDGET_EXHAUSTED. on_budget is harvest | continue | resume (default default_on_budget). persist
keeps the panel as a durable job (F2): a parent state.json linking a child record per voice, plus
voices/voice-N.md artifacts; None follows default_persistence, true / false force it.
mode="async" runs the panel as a background job and returns a job_id (poll with job_status /
job_result); mode="sync" awaits it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | sync | |
| role | No | ||
| files | No | ||
| judge | No | ||
| panel | No | ||
| effort | No | ||
| prompt | Yes | ||
| persist | No | ||
| stances | No | ||
| targets | No | ||
| strategy | No | ||
| on_budget | No | ||
| timeout_s | No | ||
| expand_all | No | ||
| synthesize | No | ||
| safety_mode | No | ||
| working_dir | No | ||
| time_budget_s | No | ||
| verdict_schema | No | ||
| panel_overrides | No | ||
| require_dissent | No | ||
| external_tracking | No | ||
| discount_correlated | No | ||
| require_independent_judge | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |