Dual-Brain
by @dannydvm
Automatically generates and saves alternative perspectives from a secondary LLM for every user message to enhance reasoning and response quality.
clawhub install dual-brainπ About This Skill
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:
Integration:
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 modelsCommands:
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 serviceConfig 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
Optional: Engram Integration
If Engram (semantic memory) is running on localhost:3400, perspectives are also stored as memories for long-term recall.
Source: