@leumas/consensus
Consensus Groups engine — panels of AI members (chatbot rows or inline provider/model/persona specs) that deliberate and synthesize one answer. Modes: panel (fan-out + judge, from the legacy...
@leumas/consensus
Consensus Groups: panels of AI members that deliberate and synthesize one answer.
- A group (
/db/consensus_groups, zero-backend CRUD) = members + a chairman + a mode + settings.
A member is a chatbots row (kind: 'chatbot' — the 18 seeded council personas work out of the box) or an inline { provider, model, system }. Any member can be research-augmented (research: { enabled, loops, searchApi }) — it runs @leumas/research before answering.
- Modes
panel— parallel answers → judge synthesis (the legacy ollama-consensus pipeline,
generalized over every provider; synthesis imports buildConsensusPrompt from @leumas/a-ollama).
council— the full council-of-high-intelligence protocol (MIT): restate gate → blind Round 1 →
anonymized Round 2 cross-examination (anti-conformity directive) → Round 3 STANCE: lines → confidence-weighted vote (⅔ of total base weight; domain seat ×1.5; honest split when unmet) → a separate Chairman model synthesizes the verdict, leading with unknowns.
quick— 2 rounds (rapid analysis → anonymized stances), same vote + chairman.duo— 2-member dialectic (no anonymization), chairman adjudicates.- Surfaces —
createConsensusRouterat/api/consensus(POST /run+POST /run/streamSSE),
the run-consensus action (rules/functioncalls/MCP), and Studio's Intelligence domain.
- Gating — logged-in +
intelligencemembership (admins bypass) + PassNodefeature:consensus.run.
Runs persist to /db/consensus_runs (checkpointed per phase). Smoke: pnpm smoke:consensus.