{"skill":{"slug":"dual-agent-debate","displayName":"DualAgentDebate","summary":"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...","description":"---\nname: dual-agent-debate\ndescription: 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 rounds (or until semantic agreement), then write the final outcome back to Open Brain. Use when user asks to compare/pressure-test an idea against prior thoughts or memory.\n---\n\n# DualAgentDebate\n\nExecute `scripts/dual_agent_debate.py` to run the debate loop.\n\n## Setup\n\nSet required environment variables:\n\n```bash\nexport OPENBRAIN_MCP_URL=\"http://127.0.0.1:54321/mcp\"\n# optional if MCP is protected\nexport OPENBRAIN_MCP_TOKEN=\"...\"\n```\n\nOptional: if you want direct OpenAI API mode, set:\n\n```bash\nexport OPENAI_API_KEY=\"...\"\n```\n\nIf `OPENAI_API_KEY` is not set, the script uses `openclaw agent` (OAuth-backed local setup) for debate responses.\n\nOptional tool/model overrides (defaults shown):\n\n```bash\nexport OPENBRAIN_CONTEXT_TOOL=\"search_docs\"\nexport OPENBRAIN_SQL_TOOL=\"execute_sql\"\nexport DEBATE_MODEL=\"gpt-4o-mini\"\n```\n\n## Run\n\n```bash\npython3 skills/dual-agent-debate/scripts/dual_agent_debate.py \\\n  --query \"Should I migrate this service to Supabase edge functions?\"\n```\n\nOptional explicit thoughts:\n\n```bash\npython3 skills/dual-agent-debate/scripts/dual_agent_debate.py \\\n  --query \"Should we launch this feature now?\" \\\n  --thoughts \"My concern is reliability and on-call burden.\" \\\n  --rounds 3 \\\n  --agreement-threshold 0.9\n```\n\n## Behavior\n\n1. Pull context from Open Brain MCP (`OPENBRAIN_CONTEXT_TOOL`).\n2. Pull related prior thoughts from `public.thoughts` via MCP `execute_sql` unless `--thoughts` is provided.\n3. Ask ChatGPT to debate the query using context and thoughts.\n4. Compute semantic similarity (OpenAI embeddings) between ChatGPT reply and thoughts.\n5. Repeat up to 3 rounds or stop early on agreement threshold.\n6. Persist full outcome into `public.memories` via MCP `execute_sql`.\n\n## Notes\n\n- If your Open Brain MCP uses different tool names or argument schemas, set the tool env vars accordingly.\n- The script uses MCP `tools/call` JSON-RPC shape; point `OPENBRAIN_MCP_URL` at your MCP HTTP endpoint.\n","tags":{"latest":"0.3.0"},"stats":{"comments":0,"downloads":605,"installsAllTime":22,"installsCurrent":0,"stars":0,"versions":4},"createdAt":1772719723636,"updatedAt":1778491734013},"latestVersion":{"version":"0.3.0","createdAt":1772720997722,"changelog":"OAuth-friendly mode via openclaw agent fallback, lexical embedding fallback, and auto-create/retry for public.memories","license":null},"metadata":null,"owner":{"handle":"tvaloki","userId":"s17f7g5r14c9tdz9gmbkb9rpc18847td","displayName":"tvaloki","image":"https://avatars.githubusercontent.com/u/147118570?v=4"},"moderation":null}