llm-council
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLLM Council
LLM Council
Karpathy's LLM Council pattern with Anthropic and OpenAI-compatible providers.
Karpathy 的 LLM Council 模式,支持 Anthropic 和兼容 OpenAI 的提供商。
When to use
何时使用
- High-stakes plan review (crosses N-file threshold)
/plan - Conflicting learning-rules → re-resolve via vote
- User invokes or
/council "<query>"/wiki council - Architecture decisions where you want multiple viewpoints captured
- Persisting deliberation as a wiki page for future reference
- 高风险计划评审(跨越 N 文件阈值)
/plan - 学习规则存在冲突 → 通过投票重新裁决
- 用户调用 或
/council "<query>"/wiki council - 希望在架构决策中记录多个观点
- 将协商记录持久化为 wiki 页面,供日后参考
Three phases
三个阶段
- Independent: each model answers in parallel
- Ranking: each model ranks anonymized peer responses
- Synthesis: chairman model reads all responses + rankings → final answer
- 独立回答:每个模型并行作答
- 排名:每个模型对匿名的同级回答进行排名
- 综合:主席模型读取所有回答和排名 → 最终答案
Provider config
提供商配置
Configure optional keys in the plugin configuration dialog. Use the MCP server's tool with and . For provider status, pass . Never request keys in chat or read them from existing credentials or shell configuration.
providersrun_provider_tasktask: "council"args: ["run", "<query>", "--provider", "openai"]args: ["providers"]For standalone CLI use, explicitly set a pro-workflow-specific variable below. The first configured provider is the default; selects one explicitly. See provider configuration.
--provider| Standalone CLI variable | Provider | Default base URL |
|---|---|---|
| Anthropic | |
| OpenAI | |
| OpenRouter | |
| Fireworks | |
| Custom OpenAI-compat | (user-supplied) |
Override per-run with .
--provider openai|anthropic|openrouter|fireworks|customDefault model rosters per provider live in and can be overridden via CSV and .
scripts/council.js--models--chairman <id>在插件配置对话框中配置可选的 API 密钥。使用 MCP 服务器的 工具,并设置 和 。若要查询提供商状态,请传入 。切勿在聊天中索要密钥,也不要从现有凭据或 shell 配置中读取它们。
providersrun_provider_tasktask: "council"args: ["run", "<query>", "--provider", "openai"]args: ["providers"]对于独立 CLI 使用场景,请显式设置下面的 pro-workflow 专用变量。首个已配置的提供商为默认提供商; 可显式选择某个提供商。请参阅提供商配置。
--provider| 独立 CLI 变量 | 提供商 | 默认基础 URL |
|---|---|---|
| Anthropic | |
| OpenAI | |
| OpenRouter | |
| Fireworks | |
| 自定义 OpenAI 兼容提供商 | (用户提供) |
每次运行均可通过 覆盖。
--provider openai|anthropic|openrouter|fireworks|custom各提供商的默认模型名单位于 中,也可通过 CSV 和 覆盖。
scripts/council.js--models--chairman <id>Commands
命令
In a plugin session, pass these runner arguments through . The direct commands below are for standalone CLI installations with explicit credentials.
run_provider_tasknode $SKILL_ROOT/scripts/council.js run "<query>" [--models id1,id2,id3] [--chairman id] [--provider <name>] [--wiki <slug>]
node $SKILL_ROOT/scripts/council.js providers
node $SKILL_ROOT/scripts/council.js show <session-id>--wiki <slug><wiki>/derived/council/<session-id>.mdwiki-cli.js page在插件会话中,通过 传递以下 runner 参数。以下直接命令用于安装了独立 CLI 且已显式配置凭据的环境。
run_provider_tasknode $SKILL_ROOT/scripts/council.js run "<query>" [--models id1,id2,id3] [--chairman id] [--provider <name>] [--wiki <slug>]
node $SKILL_ROOT/scripts/council.js providers
node $SKILL_ROOT/scripts/council.js show <session-id>--wiki <slug><wiki>/derived/council/<session-id>.mdwiki-cli.js pageOutput
输出
Each session writes:
~/.pro-workflow/council/<session-id>/
├── config.json # query, models, chairman, provider
├── phase1_responses.json # raw API responses per model
├── phase2_rankings.json # anonymized ranking outputs
├── phase3_synthesis.txt # chairman's final answer
└── final_output.md # human-readable bundleConsole prints the markdown bundle. Pipe to / as needed.
pbcopytee每次会话会写入:
~/.pro-workflow/council/<session-id>/
├── config.json # query, models, chairman, provider
├── phase1_responses.json # raw API responses per model
├── phase2_rankings.json # anonymized ranking outputs
├── phase3_synthesis.txt # chairman's final answer
└── final_output.md # human-readable bundle控制台会打印 Markdown 包。可根据需要通过 / 进行管道传输。
pbcopyteeHard rules
硬性规则
- Never skip the ranking phase. It's the core of the council pattern.
- Save raw responses to disk verbatim. No summarization in storage.
- Anonymize responses for ranking — models see , not peer names.
Response A/B/C/... - The chairman sees both real names AND rankings.
- Display all three phases to the user. No phase elision.
- 绝不能跳过排名阶段。这是 council 模式的核心。
- 将原始响应原样保存到磁盘。存储时不得进行摘要处理。
- 排名时必须匿名处理响应——模型看到的是 ,而不是同级模型的名称。
Response A/B/C/... - 主席模型必须同时看到真实名称和排名。
- 向用户展示全部三个阶段,不得省略任何阶段。
Cost awareness
成本注意事项
The script logs per-call latency + tokens on supported providers. Multiply by your provider rate to estimate. Council cost grows linearly with (each model ranks all others) plus the chairman.
len(models)^2Default council size: 3-5 models. More models = exponentially more ranking calls.
对于受支持的提供商,脚本会记录每次调用的延迟和 token 数。乘以相应提供商的费率即可估算费用。LLM Council 的成本随 线性增长(每个模型都要对其他所有模型进行排名),另加主席模型的调用成本。
len(models)^2默认 council 规模:3–5 个模型。模型越多,排名调用次数就会呈指数级增长。
Use with wiki
与 wiki 配合使用
/wiki council agent-memory "should we adopt episodic memory in our agents?"Loads wiki context as system prompt prefix, runs council, persists transcript as . The transcript becomes searchable via .
agent-memorywiki/derived/council/<id>.md/wiki ask/wiki council agent-memory "should we adopt episodic memory in our agents?"加载 wiki 上下文作为 system prompt 前缀,运行 council,并将协商记录持久化为 。该记录可通过 搜索。
agent-memorywiki/derived/council/<id>.md/wiki ask