Docs
/

Consensus Groups

@leumas/consensus

Panels of AI members that deliberate and synthesize ONE answer. Generalizes the legacy ollama-consensus pipeline over every provider, and ports the MIT council-of-high-intelligence deliberation...

Consensus Groups (@leumas/consensus)

Panels of AI members that deliberate and synthesize ONE answer. Generalizes the legacy ollama-consensus pipeline over every provider, and ports the MIT council-of-high-intelligence deliberation protocol as code.

Model

A group (/db/consensus_groups, zero-backend CRUD) = members[] + chairman + mode + settings.

  • Member = a chatbots row (kind:'chatbot', e.g. the 18 seeded council-* personas) or inline

{ provider, model, system }. Optional per member: domainSeat (×1.5 vote weight), research: { enabled, loops, searchApi } (runs @leumas/research before answering).

  • Chairman = the synthesizer; never a panelist (enforced).
  • Modes: panel (parallel + judge; fast) · council (restate gate → blind Round 1 → ANONYMIZED

Round 2 cross-exam → Round 3 STANCE: x | CONFIDENCE: high|med|low | DEALBREAKER: yes|no → confidence-weighted vote: consensus iff ≥⅔ of total BASE weight, else the honest split → Chairman verdict leading with unknowns) · quick (2 rounds + vote) · duo (dialectic).

How agents call it

SurfaceHow
Chatbot / Leviathanattach the run_consensus functioncall (executor action:run-consensus)
Automation ruleaction run-consensus { groupId, prompt, mode? }
MCP clientfunctioncalls server → run_consensus tool
HTTPPOST /api/consensus/run[/stream] with { groupId } OR an inline { group } (ad-hoc panels — AiLab does this)
StudioIntelligence → Consensus Groups / Group Chat; Builder → AI Lab (inline local panels)
CoderunConsensus({ group, prompt, mode, onEvent, signal, providerRegistry, getBot, research, connector })

SSE vocabulary

start · phase(restate|round1|round2|round3|vote|synthesis|panel) · member_start · member_done · research (nested per-member) · stance · vote · synth_start · consensus · done · error. Runs persist to /db/consensus_runs, checkpointed per phase (dropped streams lose nothing).

Gotchas

  • Panel synthesis imports buildConsensusPrompt + CONSENSUS_SYSTEM from @leumas/a-ollama — never copy them.
  • All-Ollama panels default to concurrency 2 (one GPU serializes); Studio prewarms via /api/ollama/prewarm.
  • Stance labels are cleaned of markdown/quote decoration before tallying (models emit ** monorepo).
  • Providers without a step adapter (cursor-agent, codex, slm) answer one-shot — fine for members.
  • Council cost ≈ members × 4 calls + chairman; Group Chat shows the projected call count pre-run.

Gating

requireAuth + requireMembership('intelligence') (admins bypass) + PassNode guard feature:consensus.run (author a passnode_rules doc to meter). Smoke: pnpm smoke:consensus.

Source shared/services/knowledge/build-knowledge/consensus-groups.md (no-git)markdownjson
Generated from the Leumas repository. Every page cites the file it came from.leumas.techllms.txt