← 返回
AI智能 Key 中文

Dual-Brain

Automatically generates and saves alternative perspectives from a secondary LLM for every user message to enhance reasoning and response quality.
自动为每条用户消息生成并保存辅助LLM的替代视角,以增强推理和回复质量。
dannydvm
AI智能 clawhub v0.1.1 1 版本 99954.2 Key: 需要
★ 2
Stars
📥 2,142
下载
💾 2
安装
1
版本
#cognitive-diversity#dual-brain#latest#multi-llm#second-opinion

概述

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:

  1. User sends message
  2. Daemon intercepts, sends to secondary LLM (e.g., Kimi, GPT-4, Llama)
  3. Secondary LLM generates 2-3 sentence perspective
  4. Written to ~/.dual-brain/perspectives/{agent-id}-latest.md
  5. You (primary agent) read it before responding
  6. 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 key
  • dual-brain start - Run daemon (foreground)
  • dual-brain stop - Stop daemon
  • dual-brain status - Check running status
  • dual-brain logs - View recent activity
  • dual-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:

版本历史

共 1 个版本

  • v0.1.1 当前
    2026-03-28 17:42 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Engram

dannydvm
持久语义记忆层,本地优先存储(SQLite+LanceDB)+Ollama嵌入。跨会话存储召回事实、决策、偏好、事件、关系。支持记忆衰减、去重、5类记忆、7种关系图谱、代理/用户作用域、语义搜索、上下文感知召回、文本自动抽取(规则/LLM/
★ 1 📥 2,433
ai-intelligence

self-improving agent

pskoett
捕获经验教训、错误和纠正,以实现持续改进。使用时机:(1)命令或操作意外失败;(2)用户纠正……
★ 4,059 📥 797,982
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 714 📥 244,036