Roundtable v2 — Adaptive Multi-Model Orchestrator
Trigger: roundtable [--mode] [prompt] from any channel your agent monitors.
Output: Posted to your configured output channel (set ROUNDTABLE_OUTPUT_CHANNEL in your OpenClaw config, or results are posted back to the triggering channel).
Panel agents: Persistent sessions (mode="session", thread=true) — stay alive in the Discord thread for follow-up questions. Meta-panel analysts and synthesis agent are one-shot (mode="run").
The orchestrator = COORDINATOR ONLY. Uses your default model unless overridden in panels.json. Never argues a position, never joins the panel.
Core principle: the Meta-Panel (4 premium models) designs the optimal WORKFLOW for the task — parallel debate, sequential pipeline, or hybrid — then the right agents execute it.
Configuration
Before using, set your output channel in panels.json (or the triggering channel is used):
CODEBLOCK0
If using Discord threads (optional — creates one thread per roundtable for clean organization):
{
"output": {
"channel": "discord",
"target": "YOUR_CHANNEL_ID_HERE",
"useThreads": true
}
}
Without this config, results are posted directly to the channel where the command was issued.
Cost transparency
| Component | Cost per full run |
|---|
| Claude Opus (OAuth) | Free |
| GPT-5.3 Codex (OAuth) |
Free |
| Gemini 3.1 Pro (Blockrun) | ~$0.05 |
| Grok 4 (Blockrun) | ~$0.08 |
|
Total (full panel) |
~$0.13–$0.50 |
|
Degraded mode (Claude only) |
Free |
INLINECODE7 flag halves cost (1 round only).
Setup
Minimum (degraded mode — free):
- 1. Configure
anthropic provider in openclaw.json (OAuth or API key) - Optionally add
openai-codex for GPT-5.3 Codex - Done — Grok/Gemini slots fall back to Claude Sonnet
Full panel (adds Grok 4 + Gemini 3.1 Pro via Blockrun):
- 1. Install Blockrun:
openclaw plugins install @blockrun/clawrouter then INLINECODE12 - Fund the Blockrun wallet with USDC on Base (~$5-10). Address shown during install.
- Full panel costs ~$0.13–$0.50/run; Claude and GPT slots remain free via OAuth.
Results are saved to {workspace}/memory/roundtables/YYYY-MM-DD-slug.json (created automatically).
Trigger Patterns
Optional: auto-trigger a dedicated channel
You can configure a Discord channel as a roundtable-only channel in your
AGENTS.md:
Any message in channel [YOUR_CHANNEL_ID] → treat as a roundtable topic automatically.
No prefix needed. Message → auto-detect mode → create thread → spawn orchestrator.
This is entirely optional — the explicit
roundtable command works from any channel.
Explicit trigger (any channel)
Explicit trigger (any channel)
- -
roundtable [prompt] — auto-detect mode, full flow - INLINECODE17 — force parallel debate mode
- INLINECODE18 — force build/coding mode
- INLINECODE19 — force adversarial mode
- INLINECODE20 — force decision mode
- INLINECODE21 — skip meta-panel, use default panel for mode, 1 round only
- INLINECODE22 — manual panel override, skip meta-panel
- INLINECODE23 — add Round 3 agent validation of synthesis
- INLINECODE24 — skip web search (use only for purely theoretical/abstract topics)
Step -1: Create a Thread (FIRST ACTION)
Before anything else, create a thread in your configured channel and save the thread ID.
-1a) Dedup check (REQUIRED)
Avoid double-spawn if the same topic is triggered twice.
- 1. Normalize topic string:
- lowercase
- trim
- collapse multiple spaces
- remove trailing punctuation
- 2. List recent threads in the target channel:
message(action='thread-list', channel='discord', channelId='[CHANNEL_ID]', limit=25)
- 3. If an existing active thread title matches normalized topic (+ same mode tag like
[[DEBATE]]) created in last 24h:
-
reuse that thread (
THREAD_ID = existing_thread_id)
- post:
♻️ Duplicate topic detected — reusing existing thread.
-
do NOT spawn a new orchestrator/panel
- 4. If no match: create a new thread.
-1b) Create thread (if no dedup hit)
CODEBLOCK4
Save the returned thread ID as THREAD_ID.
All subsequent message() calls use target = THREAD_ID, NOT the channel ID.
If thread creation fails or channel is not configured: fall back to posting directly in the active channel.
Step 0: Web Search Grounding (always first)
Run a web search on the topic before anything else — meta-panel and all agents will have current context.
CODEBLOCK5
Timeout policy: If web_search returns no result or errors within ~10s, do NOT block — continue immediately with CURRENT_CONTEXT = "No real-time data available (search failed or timed out).". The roundtable proceeds on model knowledge only.
Caching: If re-running the same topic within the same session, reuse the prior CURRENT_CONTEXT block — do not re-search.
Summarize results into a CURRENT_CONTEXT block (max 250 words):
- - Key facts, recent developments, relevant data points
- Date of search
- If no useful results found: note "No relevant real-time data found" and continue
This block is injected into:
- 1. The meta-panel prompt (so they design the workflow with current context)
- Every Round 1 agent prompt (so all panelists argue from the same updated baseline)
Step 0b: Meta-Panel — Workflow Design
Skip if: --panel flag used, OR --quick flag used.
Spawn 4 premium meta-analysts in parallel
Read panels.json → meta.models. For each:
CODEBLOCK6
0b. Synthesize workflow from 4 recommendations
After collecting all meta responses, the orchestrator synthesizes the final workflow:
- 1. Workflow type: majority vote among 4 recommendations
- Tie → prefer
hybrid (more flexible)
- 2. Stage composition: tally model recommendations per stage
- For each stage position, pick the most-recommended model
- If a model is not in
agents.defaults.models allowlist → skip, use next
- If a model is your orchestrator's model → skip (reserved for the orchestrator, never a panelist)
- 3. Rounds: median of recommendations (round up if tie) — hard cap at 3 max, always
- 4. Synthesis model: most-recommended premium model not on the main panel
- 5. Log the decision (include in output header):
> "Meta-panel designed workflow: [type]. Stages: [N]. Panel: [models]. Synthesis: [model]."
0c. Workflow types explained
parallel_debate — classic roundtable
- - All agents in Stage 1 work independently, same prompt
- Round 2: cross-critique
- Best for: debates, opinions, risk analysis, decision-making
sequential — output chains between stages
- - Stage 1 agents produce outputs (drafts, code, research)
- Stage 2 agents receive Stage 1 outputs and review/validate/improve
- Best for: coding (write → review), research (collect → synthesize), creative (draft → refine)
- Round 2 within Stage 1 still possible; Stage 2 is a separate pass
hybrid — parallel within stages, sequential between
- - Stage 1: N agents work in parallel on different aspects
- Stage 2: 1-2 premium agents receive ALL Stage 1 outputs and produce integrated output
- Best for: complex analysis (parallel research → premium synthesis)
0d. Panel degradation rule
If any agent fails and fallback is SAME MODEL FAMILY → log:
INLINECODE39
Always surface this in META section of final output with actionable guidance:
- - If degraded due to missing blockrun → "Action: Start Blockrun at localhost:8402 for full panel, or use
--panel budget for stable 2-model run" - If degraded due to model not in allowlist → "Action: Add [model] to
agents.defaults.models in openclaw.json" - If degraded due to API error → "Action: Check provider API key / quota, then retry"
Step 1: Detect Mode (if no flag given)
| Mode | Keywords |
|---|
| debate | pros/cons, tradeoff, should we, ethics, compare, opinion, better |
| build |
implement, code, architecture, build, design, develop, create |
|
redteam | attack, vulnerability, failure, risk, break, threat, exploit |
|
vote | choose, decide, which one, best option, select, recommend between |
|
default | anything else |
Step 2: Execute Workflow
parallel_debate (standard)
Round 1: Spawn all panel agents in parallel as persistent thread-bound sessions.
CODEBLOCK7
- - Save session keys: INLINECODE42
- Each agent writes their full response + SELF-DIGEST (last section)
- Collect all self-digests
- ⚠️ Agents stay alive — users can address them directly for follow-up questions
Round 2 (if rounds ≥ 2): Send cross-critique prompt to each existing session via sessions_send.
- - Do NOT re-spawn — reuse session keys from Round 1
- INLINECODE44 = this agent's own digest from Round 1
- INLINECODE45 = other agents' digests (labeled with role)
- Extract AGREEMENT SCORES from each response
Round 3 (if --validate): See Step 4.
sequential
Stage 1: Spawn agents in parallel as persistent sessions (mode="session", thread=true).
- - Use standard
prompts/round1.md. - Round 2 cross-critique via
sessions_send to existing sessions (no re-spawn). - Collect full Stage 1 outputs for Stage 2.
Stage 2: Spawn new persistent sessions (mode="session", thread=true).
- - Build prompt:
prompts/round1.md base + prepend Stage 1 outputs as context - Label: "STAGE 1 OUTPUT from [Role]: [full output]"
- Stage 2 agents review/validate/improve Stage 1 work and write SELF-DIGESTs
hybrid
Stage 1: Parallel persistent sessions (mode="session", thread=true), each with a different sub-task.
- - Customize Round 1 prompt to specify each agent's sub-task:
> "Your specific task for this stage: [task from workflow design]"
- - Agents write SELF-DIGESTs
Stage 2: 1-2 new persistent sessions (mode="session", thread=true) with all Stage 1 outputs embedded.
- - Build prompt:
prompts/round1.md base + "You are integrating and synthesizing the work of multiple agents. Their outputs: [all Stage 1 outputs]" - Stage 2 produces the integrated output
Step 3: Consensus Scoring
After Round 2 (parallel_debate) or Stage 2 (sequential/hybrid):
Extract AGREEMENT SCORES from each agent's Round 2 response.
Build score matrix: { agent_role: { peer_role: score_1_to_5 } }
Consensus % = (sum of all scores / (n_scores × 5)) × 100
If no Round 2 scores (quick mode / sequential): omit consensus %, mark as "N/A"
Note on Round 3: Round 3 validation uses ACCURATE/PARTIALLY/INACCURATE — this is a separate metric from consensus %. Round 3 checks synthesis fidelity, not inter-agent agreement. Do NOT mix these two metrics. Consensus % comes only from Round 2 scores; Round 3 result appears separately in the META block as Validated: yes/no/partial.
Step 4: Round 3 — Validation (--validate flag only)
When to recommend --validate to the user:
- - Consensus % < 40% (high disagreement — synthesis risks distortion)
- Redteam mode (adversarial stakes — synthesis must be bulletproof)
- Build mode with 3+ Stage 2 models (complex integration, easy to misrepresent)
- User explicitly mentions "high-stakes", "final decision", or "publishing this"
When NOT to use it: Quick mode, debate on subjective topics, or when time matters more than precision.
Draft synthesis first (Step 5 below), but do NOT post.
Spawn validation agents:
CODEBLOCK8
Tally:
- - 2+ INACCURATE → rewrite synthesis incorporating corrections
- 1 INACCURATE → note in META: INLINECODE63
- All ACCURATE/PARTIAL → mark
Validated: yes or Validated: partial in META
Step 5: Synthesis — Spawned Neutral Model
Never write synthesis yourself.
CODEBLOCK9
Fill prompts/final-synthesis.md placeholders:
- -
[ROUND1_SUMMARIES] → all self-digests: "[ROLE] ([model]): [digest]" - INLINECODE68 → critiques: "[ROLE] criticized [peer]'s [claim] because [reason]"
- INLINECODE69 → full score matrix + calculated %
- INLINECODE70 → the THREAD_ID from Step -1 (synthesis agent posts here)
Post to Discord using THREAD_ID from Step -1 (not the channel ID). All round outputs and the final synthesis go into the same thread.
Step 6: Persist Results
Save to {workspace}/memory/roundtables/YYYY-MM-DD-[topic-slug].json:
CODEBLOCK10
Also append one JSONL line to {workspace}/memory/roundtables/scorecard.jsonl with:
ts, topic, mode, workflow_type, elapsed_time_sec, consensus_pct, validated, panel_degraded.
Edge Cases
| Situation | Action |
|---|
| Web search fails | Continue with note "No real-time context available" in all prompts |
| INLINECODE75 flag |
Skip Step 0 web search entirely |
| Meta-panel all fail | Use default panel for detected mode, log warning |
|
--quick | Skip meta-panel + round 2. Always uses
parallel_debate workflow. Spawns default panel for detected mode (3 models). Synthesizes after round 1 only. |
|
--panel override | Skip meta-panel, use specified models, default to parallel_debate |
| Fallback = same family | Continue + log PANEL DEGRADED warning in META |
| Both model and fallback fail | Skip agent, note in META —
do not wait, do not block |
| No blockrun configured | Warn user: "Blockrun not available. Using budget panel. Full panel requires Blockrun at localhost:8402." Auto-switch to
budget profile from panels.json. |
| Agent timeout (any round) |
FAIL-CONTINUE: treat as absent, mark
[TIMEOUT] in META, proceed with surviving agents |
| Agent fails mid-Round 2 | Use its Round 1 digest as final position, omit its scores from consensus calculation |
| Synthesis agent fails | Orchestrator writes synthesis, note: "Synthesis by orchestrator (bias risk — no neutral model available)" |
| Stage 2 agent fails | Note in META, synthesize with Stage 1 only |
| 0 agents respond | Report failure, suggest retry |
| 1 agent responds | Skip Round 2 (no peers), synthesize from Round 1 only, mark consensus "N/A" |
|
--context-from SLUG | Load
{workspace}/memory/roundtables/[slug].json, extract
synthesis field, prepend to
CURRENT_CONTEXT as "PRIOR ROUNDTABLE CONTEXT: [synthesis]". If file not found: warn and continue without prior context. |
Placeholder Contract
When filling prompt templates, apply this rule for every [PLACEHOLDER]:
| Placeholder | If missing/failed | Action |
|---|
| INLINECODE86 | Web search failed | Insert: "No real-time context available." |
| INLINECODE87 |
Agent timed out R1 | Skip agent entirely from R2 |
|
[PEER_DIGESTS] | All peers failed | Skip R2, go to synthesis directly |
|
[ROUND1_SUMMARIES] | No R1 outputs | Abort with error: "0 agents responded" |
|
[ROUND2_SUMMARIES] | Quick mode / no R2 | Insert: "No cross-critique (quick mode or single round)" |
|
[CONSENSUS_SCORES] | No scores extracted | Insert: "N/A — scores not available" |
|
[SYNTHESIS_DRAFT] | Synthesis failed | Skip R3, note in META |
Never leave a [PLACEHOLDER] unfilled in a prompt. Unfilled placeholders confuse models and produce garbage output.
Score Parsing (Round 2)
Agents write scores in free text. Extract scores with this heuristic:
- 1. Look for the
SCORES: block - Match pattern:
- [Role]: X/5 — extract integer X (1–5) - If no clean integer found, scan for digit 1–5 nearest to the role name
- If still ambiguous → assign 3 (neutral) and note
[SCORE INFERRED] in META
Do NOT crash the workflow on a malformed score block.
Quick Reference: Default Panels (fallback if meta-panel fails)
CODEBLOCK11
Roundtable v2 — 自适应多模型编排器
触发方式: 在您的智能体监控的任何频道中输入 roundtable [--模式] [提示词]。
输出: 发布到您配置的输出频道(在您的 OpenClaw 配置中设置 ROUNDTABLEOUTPUTCHANNEL,否则结果将发布回触发频道)。
面板智能体: 持久化会话(mode=session,thread=true)——在 Discord 线程中保持活跃以回答后续问题。元面板分析师和综合智能体为一次性运行(mode=run)。
编排器 = 仅协调者。 使用您的默认模型,除非在 panels.json 中覆盖。从不争论立场,从不加入面板。
核心原则:元面板(4个高级模型)为任务设计最优工作流——并行辩论、串行流水线或混合模式——然后由相应的智能体执行。
配置
使用前,在 panels.json 中设置您的输出频道(否则使用触发频道):
json
{
output: {
channel: discord,
target: 您的频道ID
}
}
如果使用 Discord 线程(可选——每次圆桌会议创建一个线程以保持清晰组织):
json
{
output: {
channel: discord,
target: 您的频道ID,
useThreads: true
}
}
若无此配置,结果将直接发布到发出命令的频道。
成本透明
| 组件 | 每次完整运行成本 |
|---|
| Claude Opus (OAuth) | 免费 |
| GPT-5.3 Codex (OAuth) |
免费 |
| Gemini 3.1 Pro (Blockrun) | ~$0.05 |
| Grok 4 (Blockrun) | ~$0.08 |
|
总计(完整面板) |
~$0.13–$0.50 |
|
降级模式(仅Claude) |
免费 |
--quick 标志将成本减半(仅1轮)。
设置
最低配置(降级模式——免费):
- 1. 在 openclaw.json 中配置 anthropic 提供商(OAuth 或 API 密钥)
- 可选:为 GPT-5.3 Codex 添加 openai-codex
- 完成——Grok/Gemini 槽位将回退到 Claude Sonnet
完整面板(通过 Blockrun 添加 Grok 4 + Gemini 3.1 Pro):
- 1. 安装 Blockrun:openclaw plugins install @blockrun/clawrouter 然后 openclaw gateway restart
- 在 Base 网络上向 Blockrun 钱包充值 USDC(约 $5-10)。安装过程中会显示地址。
- 完整面板每次运行约 $0.13–$0.50;Claude 和 GPT 槽位通过 OAuth 保持免费。
结果保存到 {workspace}/memory/roundtables/YYYY-MM-DD-slug.json(自动创建)。
触发模式
可选:自动触发专用频道
您可以在 AGENTS.md 中将 Discord 频道配置为仅圆桌会议频道:
频道 [您的频道ID] 中的任何消息 → 自动视为圆桌会议主题。
无需前缀。消息 → 自动检测模式 → 创建线程 → 生成编排器。
这完全是可选的——显式的 roundtable 命令可在任何频道使用。
显式触发(任何频道)
- - roundtable [提示词] — 自动检测模式,完整流程
- roundtable --debate [提示词] — 强制并行辩论模式
- roundtable --build [提示词] — 强制构建/编码模式
- roundtable --redteam [提示词] — 强制对抗模式
- roundtable --vote [提示词] — 强制决策模式
- roundtable --quick [提示词] — 跳过元面板,使用默认面板,仅1轮
- roundtable --panel model1,model2,model3 [提示词] — 手动覆盖面板,跳过元面板
- roundtable --validate [提示词] — 添加第3轮智能体对综合结果的验证
- roundtable --no-search [提示词] — 跳过网络搜索(仅用于纯理论/抽象主题)
第 -1 步:创建线程(首要操作)
在进行任何其他操作之前,在您配置的频道中创建一个线程并保存线程 ID。
-1a) 去重检查(必需)
避免同一主题被触发两次时重复生成。
- 1. 标准化主题字符串:
- 小写
- 修剪
- 合并多个空格
- 移除尾部标点
- 2. 列出目标频道中的最近线程:
message(action=thread-list, channel=discord, channelId=[频道ID], limit=25)
- 3. 如果现有活跃线程标题与标准化主题匹配(+ 相同模式标签如 [[DEBATE]])且创建时间在最近24小时内:
-
重用该线程(THREAD
ID = existingthread_id)
- 发布:♻️ 检测到重复主题——重用现有线程。
-
不要生成新的编排器/面板
- 4. 若无匹配:创建新线程。
-1b) 创建线程(若无去重命中)
message(
action = thread-create,
channel = [您配置的频道],
channelId = [用户配置中的频道ID],
threadName = 🎯 [主题 — 最多8个词] [[模式]],
message = 面板: [模型列表]\n模式: [模式] | 轮次: [N]\n⏳ 分析进行中...
)
将返回的线程 ID 保存为 THREAD_ID。
所有后续的 message() 调用使用 target = THREAD_ID,而非频道 ID。
如果线程创建失败或频道未配置:回退到直接在活跃频道中发布。
第 0 步:网络搜索基础(始终优先)
在任何其他操作之前对主题进行网络搜索——元面板和所有智能体将拥有当前上下文。
web_search(query = 提示词, count = 5)
超时策略: 如果 websearch 在约10秒内无结果或出错,不要阻塞——立即继续,使用 CURRENTCONTEXT = 无实时数据可用(搜索失败或超时)。。圆桌会议仅基于模型知识进行。
缓存: 如果在同一会话中重新运行同一主题,重用先前的 CURRENT_CONTEXT 块——不要重新搜索。
将结果总结为 CURRENT_CONTEXT 块(最多250词):
- - 关键事实、最新发展、相关数据点
- 搜索日期
- 如果未找到有用结果:注明未找到相关实时数据并继续
此块将注入到:
- 1. 元面板提示词(以便他们在当前上下文中设计工作流)
- 每个第1轮智能体提示词(以便所有小组成员从同一更新基线进行论证)
第 0b 步:元面板——工作流设计
如果使用 --panel 标志或 --quick 标志,则跳过。
并行生成4个高级元分析师
读取 panels.json → meta.models。对每个:
sessions_spawn(
task = 填充后的 prompts/meta-panel.md,
model = model_id,
mode = run,
label = rt-meta-[A/B/C/D],
runTimeoutSeconds = 90
)
0b. 从4个推荐中综合工作流
收集所有元响应后,编排器综合最终工作流:
- 1. 工作流类型:4个推荐中的多数投票
- 平局 → 优先选择 hybrid(更灵活)
- 2. 阶段组成:统计每个阶段的模型推荐
- 对于每个阶段位置,选择最推荐的模型
- 如果模型不在 agents.defaults.models 允许列表中 → 跳过,使用下一个
- 如果模型是编排器的模型 → 跳过(保留给编排器,从不作为小组成员)
- 3. 轮次:推荐的中位数(平局时向上取整)——硬上限为3轮,始终如此
- 4. 综合模型:不在主面板上的最推荐高级模型
- 5. 记录决策(包含在输出头部):
> 元面板设计的工作流:[类型]。阶段数:[N]。面板:[模型]。综合:[模型]。
0c. 工作流类型说明
parallel_debate — 经典圆桌会议
- - 第1阶段所有智能体独立工作,使用相同提示词
- 第2轮:交叉批评
- 最适合:辩论、意见、风险分析