双脑:为智能体提供多 LLM 认知多样性 - Openclaw 技能
作者:互联网
2026-04-10
什么是 双脑技能?
双脑(Dual-Brain)技能是一个复杂的架构扩展,旨在提高 AI 智能体交互的可靠性和深度。通过利用辅助 LLM 提供商(如 OpenAI、Groq、Moonshot 或 Ollama),此 Openclaw 技能组件充当后台顾问,对每条传入的用户消息提供替代观点。这种设置确保您的主智能体不会孤立运行,从而在实时中有效地模拟多智能体同行评审过程。
这种集成对于构建准确性和多维思考至关重要的复杂自主系统的开发人员至关重要。通过结合双脑等 Openclaw 技能,用户可以显着减轻模型特定的偏差,并捕捉单个模型可能忽略的技术边缘情况。它提供了一种轻量级的方法来实现高阶推理,而无需完整多智能体编排框架的复杂性。
下载入口:https://github.com/openclaw/skills/tree/main/skills/dannydvm/dual-brain
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install dual-brain
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 dual-brain。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
双脑技能 应用场景
- 在 AI 驱动的代码编写过程中生成替代架构方案。
- 通过比较两个不同 LLM 家族(如 GPT-4 与 Llama 3)之间的推理来降低幻觉风险。
- 通过在后台自动生成多样化的认知视角来增强头脑风暴会议。
- 为面向客户的支持智能体实现自动化的质量保证层。
- 用户向主智能体发送消息,该消息记录在 OpenClaw 会话 JSONL 中。
- 双脑守护程序(这些 Openclaw 技能的核心实用程序)轮询会话日志以查找新条目。
- 触发辅助 LLM 提供商针对用户意图生成简洁的 2-3 句见解。
- 该见解被写入本地文件系统中的特定 markdown 文件(
~/.dual-brain/perspectives/{agent-id}-latest.md)。 - 主智能体在生成最终响应之前读取此最新见解。
- 主智能体将自身的推理与辅助见解合成为单一的高质量输出。
双脑技能 配置指南
通过 npm 全局安装软件包,并按照交互式设置配置您首选的 LLM 提供商:
npm install -g openclaw-dual-brain
dual-brain setup
dual-brain start
为了确保进程保持活动状态,您可以使用 dual-brain install-daemon 将该技能注册为系统服务。
双脑技能 数据架构与分类体系
该技能在用户主目录的隐藏目录中组织其配置和见解数据。这允许 Openclaw 技能在会话之间保持持久状态。
| 路径 | 类型 | 描述 |
|---|---|---|
~/.dual-brain/config.json |
JSON | API 密钥、提供商和模型选择的配置。 |
~/.dual-brain/perspectives/ |
目录 | 包含每个活动智能体 ID 的最新 .md 文件。 |
{agent-id}-latest.md |
Markdown | 主智能体读取的实际辅助见解内容。 |
Dual-Brain Skill
What it does: Provides cognitive diversity by automatically generating perspectives from a secondary LLM (different from your primary model) for every user message.
For Agents
Before responding to any user message, check for a dual-brain perspective:
cat ~/.dual-brain/perspectives/{your-agent-id}-latest.md
If the file exists and contains a recent perspective (check timestamp in comment), consider it alongside your own reasoning. The perspective may highlight:
- Angles you might miss
- Alternative approaches
- Important things to verify
Integration:
- Perspectives are generated automatically by a background daemon
- No manual action required on your part
- Simply read the file before forming your response
- Synthesize both viewpoints (yours + the secondary LLM's)
Example workflow:
- User sends message
- Daemon intercepts, sends to secondary LLM (e.g., Kimi, GPT-4, Llama)
- Secondary LLM generates 2-3 sentence perspective
- Written to
~/.dual-brain/perspectives/{agent-id}-latest.md - You (primary agent) read it before responding
- You synthesize both perspectives into your answer
For Humans
Setup:
npm install -g openclaw-dual-brain
dual-brain setup # Interactive configuration
dual-brain start # Start daemon
Providers:
ollama- Local models (zero cost, requires Ollama)moonshot- Kimi/Moonshot API (Chinese LLM, fast)openai- GPT-4o, GPT-4-turbo, etc.groq- Fast inference with Llama models
Commands:
dual-brain setup- Configure provider, model, API keydual-brain start- Run daemon (foreground)dual-brain stop- Stop daemondual-brain status- Check running statusdual-brain logs- View recent activitydual-brain install-daemon- Install as system service
Config location: ~/.dual-brain/config.json
Perspectives location: ~/.dual-brain/perspectives/
Architecture
User Message → OpenClaw Session (JSONL)
↓
Dual-Brain Daemon (polling)
↓
Secondary LLM Provider
(ollama/moonshot/openai/groq)
↓
Perspective Generated (2-3 sentences)
↓
~/.dual-brain/perspectives/{agent}-latest.md
↓
Primary Agent reads & synthesizes
↓
Response to User
Benefits
- Cognitive diversity - Two AI models = broader perspective
- Bias mitigation - Different training data/approaches
- Quality assurance - Second opinion catches issues
- Zero agent overhead - Runs in background, <1s latency
- Provider flexibility - Choose cost vs. quality tradeoff
Optional: Engram Integration
If Engram (semantic memory) is running on localhost:3400, perspectives are also stored as memories for long-term recall.
Source: https://github.com/yourusername/openclaw-dual-brain
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
2026年企业级BI系统建设方案:从规划、数据治理到运营迭代的完整闭环
2026 OpenClaw 最新版一键安装指南:Windows 系统专属
2026年企业如何把智能客服系统用好?打造高效智能服务体系,实现降本增效
2026 最新 OpenClaw 部署指南:Windows 一键安装,高效稳定零门槛
零代码!2026 OpenClaw Windows 一键安装教程,新手友好版
OpenClaw 安装后无法启动问题解决方法
Anthropic 的论文探讨了大语言模型中类情绪机制对行为的影响
从Function Call到Skill商店:三层技术栈如何解决大模型输出不稳定难题?
SecureCRT & SecureFX 9.7.2 发布 - 跨平台的多协议终端仿真和文件传输
# 【含最新安装包】AI 数字员工 OpenClaw Windows 一键安装教程
AI精选
