← 返回 Skills 市场
tvaloki

DualAgentDebate

作者 tvaloki · GitHub ↗ · v0.3.0
cross-platform ✓ 安全检测通过
294
总下载
0
收藏
0
当前安装
4
版本数
在 OpenClaw 中安装
/install dual-agent-debate
功能描述
Run a structured 2-agent debate loop between ChatGPT (OpenAI API) and the user's own thoughts retrieved from Supabase Open Brain via MCP, iterating up to 3 r...
使用说明 (SKILL.md)

DualAgentDebate

Execute scripts/dual_agent_debate.py to run the debate loop.

Setup

Set required environment variables:

export OPENBRAIN_MCP_URL="http://127.0.0.1:54321/mcp"
# optional if MCP is protected
export OPENBRAIN_MCP_TOKEN="..."

Optional: if you want direct OpenAI API mode, set:

export OPENAI_API_KEY="..."

If OPENAI_API_KEY is not set, the script uses openclaw agent (OAuth-backed local setup) for debate responses.

Optional tool/model overrides (defaults shown):

export OPENBRAIN_CONTEXT_TOOL="search_docs"
export OPENBRAIN_SQL_TOOL="execute_sql"
export DEBATE_MODEL="gpt-4o-mini"

Run

python3 skills/dual-agent-debate/scripts/dual_agent_debate.py \
  --query "Should I migrate this service to Supabase edge functions?"

Optional explicit thoughts:

python3 skills/dual-agent-debate/scripts/dual_agent_debate.py \
  --query "Should we launch this feature now?" \
  --thoughts "My concern is reliability and on-call burden." \
  --rounds 3 \
  --agreement-threshold 0.9

Behavior

  1. Pull context from Open Brain MCP (OPENBRAIN_CONTEXT_TOOL).
  2. Pull related prior thoughts from public.thoughts via MCP execute_sql unless --thoughts is provided.
  3. Ask ChatGPT to debate the query using context and thoughts.
  4. Compute semantic similarity (OpenAI embeddings) between ChatGPT reply and thoughts.
  5. Repeat up to 3 rounds or stop early on agreement threshold.
  6. Persist full outcome into public.memories via MCP execute_sql.

Notes

  • If your Open Brain MCP uses different tool names or argument schemas, set the tool env vars accordingly.
  • The script uses MCP tools/call JSON-RPC shape; point OPENBRAIN_MCP_URL at your MCP HTTP endpoint.
安全使用建议
Before installing/running: 1) Confirm OPENBRAIN_MCP_URL points to a trusted Open Brain MCP endpoint (do not point it at an unknown public URL). 2) If you provide OPENBRAIN_MCP_TOKEN, ensure the token has least privilege (read and an intentionally scoped write permission) since the script will INSERT into public.memories. 3) Review the SQL statements in the script to ensure they match your schema and don't unintentionally expose or overwrite data; run against a staging/dev instance first. 4) If you do not want data sent to OpenAI, omit OPENAI_API_KEY — note the script will call your local openclaw agent instead, which may use local configuration/credentials. 5) The registry metadata incorrectly lists no required env vars — treat the SKILL.md and script as the source of truth and ask the publisher to correct the metadata. 6) If you have sensitive content, audit the actual SQL insert and decide whether to sanitize or redact before running. If any of the above are unacceptable, do not run the skill or run it in an isolated/test environment first.
功能分析
Type: OpenClaw Skill Name: dual-agent-debate Version: 0.3.0 The skill implements a structured debate loop between an LLM and a local knowledge base (Supabase/Open Brain) via Model Context Protocol (MCP). It uses standard subprocess calls to the local 'openclaw' CLI and authenticated requests to OpenAI for embeddings and chat completions. While it performs dynamic SQL operations (including table creation and data insertion into 'public.memories'), it employs dollar-quoting mitigations to handle string safety and limits its scope to the documented purpose of managing 'thoughts' and 'memories'. No evidence of data exfiltration, unauthorized persistence, or malicious intent was found in scripts/dual_agent_debate.py or the associated documentation.
能力评估
Purpose & Capability
The script uses an MCP HTTP endpoint (OPENBRAIN_MCP_URL / optional OPENBRAIN_MCP_TOKEN) and OpenAI (or a local openclaw agent) to implement the described debate loop; those capabilities are coherent with the stated purpose. However the registry metadata declares no required env vars while SKILL.md and the script do require/expect OPENBRAIN_MCP_URL and optionally OPENBRAIN_MCP_TOKEN and OPENAI_API_KEY — this metadata mismatch should be corrected or called out to users.
Instruction Scope
SKILL.md and the script stick to the declared task: they fetch context and prior thoughts via MCP tools, call an LLM for debate rounds, compute embeddings to measure semantic agreement, and persist the outcome back to the user's Open Brain. The script only contacts the MCP endpoint you point it to and (optionally) OpenAI or local openclaw; it does not try to read unrelated system files or external endpoints beyond those.
Install Mechanism
This is an instruction-only skill with an included Python script; there is no install spec that downloads arbitrary code or packages from external URLs. Risk from installation is low — running the script executes local Python and may spawn the openclaw CLI if no OpenAI key is provided.
Credentials
Requested environment variables (OPENBRAIN_MCP_URL, optional OPENBRAIN_MCP_TOKEN, optional OPENAI_API_KEY, and a few tool override vars) are proportionate to the functionality. Important caveat: the script issues SQL calls via the MCP 'execute_sql' tool and will persist debate outcomes into public.memories; this requires the MCP token (or the MCP service pointed at by URL) to allow writes. Verify the token has least privilege and that you expect the skill to write into public.memories. Also note the registry metadata omits these env requirements, which is misleading.
Persistence & Privilege
The skill does not set always:true and does not modify other skills or global agent settings. Its main privileged action is writing the debate outcome into the user's Open Brain via execute_sql — that is consistent with its purpose but is a sensitive write operation you should authorize.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install dual-agent-debate
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /dual-agent-debate 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.3.0
OAuth-friendly mode via openclaw agent fallback, lexical embedding fallback, and auto-create/retry for public.memories
v0.2.0
Hardened retries, semantic thought retrieval, schema-aware memory inserts, and safer SQL quoting
v0.1.1
Use execute_sql with public.thoughts retrieval and public.memories persistence
v0.1.0
Initial release: OpenAI+Open Brain MCP multi-round semantic debate with outcome persistence
元数据
Slug dual-agent-debate
版本 0.3.0
许可证
累计安装 0
当前安装数 0
历史版本数 4
常见问题

DualAgentDebate 是什么?

Run a structured 2-agent debate loop between ChatGPT (OpenAI API) and the user's own thoughts retrieved from Supabase Open Brain via MCP, iterating up to 3 r... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 294 次。

如何安装 DualAgentDebate?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install dual-agent-debate」即可一键安装,无需额外配置。

DualAgentDebate 是免费的吗?

是的,DualAgentDebate 完全免费(开源免费),可自由下载、安装和使用。

DualAgentDebate 支持哪些平台?

DualAgentDebate 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 DualAgentDebate?

由 tvaloki(@tvaloki)开发并维护,当前版本 v0.3.0。

💬 留言讨论