Multi-model consensus using the Karpathy LLM Council pattern for critical decisions
Before writing ANY code, you MUST check:
.claude/library/catalog.json.claude/docs/inventories/LIBRARY-PATTERNS-GUIDE.mdD:\Projects\*| Match | Action | |-------|--------| | Library >90% | REUSE directly | | Library 70-90% | ADAPT minimally | | Pattern exists | FOLLOW pattern | | In project | EXTRACT | | No match | BUILD (add to library after) |
Run 3-stage multi-model consensus for critical decisions where:
STAGE 1: COLLECT
+---> Claude ---> Response A
|
Query --+---> Gemini ---> Response B
|
+---> Codex ----> Response C
STAGE 2: RANK
Each model reviews others (anonymized)
Produces rankings with rationale
STAGE 3: SYNTHESIZE
Chairman aggregates rankings
Produces final answer with consensus score
/llm-council "Should we use microservices or monolith for this system?"
/llm-council "Which auth approach is best?" --threshold 0.75
/llm-council "Architecture decision" --chairman gemini
bash scripts/multi-model/llm-council.sh "<query>" "<threshold>" "<chairman>"
| Parameter | Default | Description | |-----------|---------|-------------| | threshold | 0.67 | Minimum consensus score | | chairman | claude | Model that synthesizes final answer | | models | [claude, gemini, codex] | Participating models |
Results stored to Memory-MCP:
multi-model/council/decisions/{query_id}{
"query": "Original question",
"final_answer": {
"synthesis": "Combined answer...",
"chairman": "claude"
},
"consensus_score": 0.85,
"responses": {
"claude": "...",
"gemini": "...",
"codex": "..."
},
"rankings": [
{"model": "A", "rank": 1, "rationale": "..."}
]
}
const decision = await runCouncil(
"Microservices vs Monolith for our scale?",
{ threshold: 0.75 }
);
if (decision.consensus_score >= 0.75) {
proceed(decision.final_answer);
} else {
escalateToHuman(decision);
}
const assessment = await runCouncil(
"Is this authentication approach secure?",
{ threshold: 0.80 }
);
// Higher threshold for security decisions
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer