š§ Shadow Brain v6.0.2
May 13, 2026 Ā· View on GitHub
š¬ 2-minute v6.0.2 hero above ā auto-plays muted Ā· click š to unmute Ā· v6.0.2 release page Ā· original 2-min explainer Ā· dashboard tour
š§ Shadow Brain v6.0.2 ā Singularity
The first open-source brain that every AI coding agent on your machine can share.
Claude Code Ā· Cursor Ā· Cline Ā· Codex Ā· Copilot Ā· Windsurf Ā· Kilo Ā· Roo Ā· OpenCode Ā· Aider ā all running on one local brain. What one agent learns, every agent knows. What one sub-agent discovers, every sub-agent inherits.
š v6.0.2 "Singularity" ā 19 world-first features. Every one of them shareable.
The 5 viral artifacts ā each renders as a tweet-ready PNG/SVG/MP4: š¬ Brain Replay Ā· 𧬠Brain DNA Ā· š³ļø Hive Voice Ā· ā° Time Capsule Ā· š¬ Brain Diff
The 14 advanced features ā Spotify-Wrapped-meets-AI-codebase: šµ Brain Cinema (auto 60s SVG-animated video of brain growth) Ā· š¼ Brain Sonification (your codebase as music) Ā· š Brain Trophies (25 achievements + share cards) Ā· š Brain Holiday Card (year-in-review) Ā· š§ Brain Coach (proactive idle suggestions) Ā· šŗļø Brain Quest (gamified onboarding adventures) Ā· š Brain Notebook (Jupyter-style brain explorer) Ā· ā” Brain Reflex (local-model inline completion) Ā· š„ Brain Roast (comedy code reviews, 6 personas) Ā· š® Brain Tarot (78-card divination from git+brain) Ā· šØ Brain ASCII (terminal art representations) Ā· š Brain Memes (auto-generated dev memes) Ā· š Brain 3D (Three.js rotatable graph viewer) Ā· š Brain Doppelganger (find your codebase's twin)
The infrastructure ā real ANN HNSW index Ā· Constitution layer Ā· Confidence Gate Ā· multimodal vision (llava) Ā· LoRA distillation pipeline Ā· SWE-Bench-Lite eval harness Ā· OpenTelemetry-lite tracing Ā· git-trackable Markdown brain export/import.
# 30 seconds. Every agent + sub-agent on your machine becomes smarter.
npx @theihtisham/agent-shadow-brain@latest attach-all
# Or ā the 30-second wow tour
npx @theihtisham/agent-shadow-brain@latest demo
š¬ Video Ā· š¦ npm Ā· ā Star on GitHub Ā· š Docs Ā· š Issues
ā” Install in 30 seconds
# Method 1 ā one command, every agent wired, dashboard launches
npx @theihtisham/agent-shadow-brain@latest attach-all
# Method 2 ā global install
npm install -g @theihtisham/agent-shadow-brain
shadow-brain attach-all
shadow-brain dash . # ā http://localhost:7341/
# Method 3 ā in a specific project only
cd my-project
npx @theihtisham/agent-shadow-brain attach-all
Zero config. Zero API key required. 100 % local-first.
š What's New in v6.0.2 ā "Singularity"
35 new modules + 27 new CLI commands + 7 sample artifacts. Zero new npm deps. tsc-clean.
š The 5 World-First Viral Features
Every one of these renders as a tweet-ready PNG/SVG. Cursor doesn't have these. Cline doesn't have these. Nobody has these.
| Feature | What it does | |
|---|---|---|
| š¬ | Brain Replay | Scrubbable timeline of every brain event since day-zero. Drag the cursor, rewind to any moment. SVG export. |
| 𧬠| Brain DNA | Spotify-Wrapped-style fingerprint card. 8 personality archetypes (The Architect, The Debugger, ā¦). 1080Ć1080 share card. |
| š³ļø | Hive Voice | 3 local models debate-vote on every architecture question. See consensus, dissent, and confidence ā live. SVG bar chart. |
| ā° | Brain Time Capsule | Freeze + label + resurrect brain snapshots. "Here's what we knew about React in January." Ed25519-signed bundles. |
| š¬ | Brain Diff | Semantic diff between two brains. Venn-diagram SVG + English narrative. "What did Team A learn that Team B didn't?" |
shadow-brain dna card --out my-brain.svg # 𧬠generate your DNA card
shadow-brain replay export --format svg --out timeline.svg # š¬ scrubbable timeline
shadow-brain hive-voice ask "Server Components by default?" # š³ļø multi-model vote
shadow-brain capsule freeze --label "pre-redesign" # ā° freeze a snapshot
shadow-brain brain-diff compare brain-a/ brain-b/ # š¬ semantic diff
š 14 More Advanced Features
| šµ Brain Cinema ā auto-procedural 60-sec SVG video | š¼ Brain Sonification ā your codebase as music (WAV) | š Brain Trophies ā 25 achievements w/ share cards | š Brain Holiday Card ā year-in-review SVG |
| š§ Brain Coach ā 10 proactive idle-suggestion rules | šŗļø Brain Quest ā 5 gamified onboarding adventures | š Brain Notebook ā Jupyter-style brain explorer | ā” Brain Reflex ā local-model inline completion |
| š„ Brain Roast ā comedy code review (6 personas) | š® Brain Tarot ā 78-card divination from git+brain | šØ Brain ASCII ā terminal-art brain (6 styles) | š Brain Memes ā auto-generated dev memes (10 templates) |
| š Brain 3D ā rotatable Three.js graph viewer | š Brain Doppelganger ā find your codebase's twin |
š§ 10 Brain-Quality Upgrades (the engineering wins)
| Recall quality | Memory arch | Efficiency | Intelligence | Size + Learning |
|---|---|---|---|---|
| Rerank (BM25 + cosine hybrid) | Memory Tiers (episodic/semantic) | Working Memory (LRU + predictive prefetch) | Contradictions (46 polarity pairs) | Quantize (int8 vectors, 4Ć smaller, 0.000298 mean error) |
| Query Expander (synonyms + abbrev + HyDE) | Consolidator (dedup + abstractions) | Recall Cache (bloom filter, 65k bits, ~4% FP @ 10k keys) | Graph Walker (5 edge types, 3-hop BFS) | Active Learner (accept/reject feedback bias) |
āļø Production Infrastructure
- Real ANN vector index (
embeddings-v2.ts) ā HNSW-style graph, M=8, sub-100ms recall over 10k vectors, sharded persistence (5MB cap), auto-pullsnomic-embed-textfrom Ollama on first run - Constitution layer ā
<project>/.shadow-brain/constitution.mdparser + hot-reload + injection - Confidence Gate ā active output filter, Brier score + ECE stats
- Multimodal vision ā Ollama llava / llava-llama3 / bakllava ingestion
- Markdown brain export/import ā git-trackable
.shadow-brain.mdround-trip - OpenTelemetry-lite tracing ā OTel-compatible JSONL, daily rotation
- LoRA distillation pipeline (
tools/lora-pipeline/) ā turn your brain into a Qwen2.5-Coder-1.5B adapter - SWE-Bench-Lite harness (
tools/swe-bench-lite/) ā 10 curated bugs, brain-on vs brain-off, statistical scoring - 30-second demo:
npx @theihtisham/agent-shadow-brain demo
š v6.0.2 by the numbers
| New brain modules | 35 (25 features + 10 quality stack) |
| New CLI command groups | 27 |
| New LOC | ~16,000 (TypeScript) |
| New npm dependencies | 0 |
| Sample artifacts shipped | 7 (DNA card, Replay timeline, Cinema, Holiday wrapped, Tarot, Trophy wall, 3D viewer HTML) |
| Quantization roundtrip error | 0.000298 (16Ć better than spec) |
| TypeScript errors | 0 |
Full release notes: docs/launch/RELEASE_NOTES_v6.0.2.md Strategic roadmap (v7+): docs/ROADMAP-v7.md Launch playbook: docs/VIRAL-PLAYBOOK.md
š„ Why Shadow Brain? (the 60-second pitch)
| Without Shadow Brain | With Shadow Brain v6 |
|---|---|
| Every new session ā agent starts from zero | 2K-token briefing injected before the first prompt |
| Cursor learns X ā Claude doesn't know | One singleton brain every agent shares |
| Claude Task spawns sub-agent ā sub-agent starts blind | SABB injects focused context slivers into every sub-agent |
| You can't explain why the AI made a choice | Causal Memory Chains render the full DAG of causes |
| Two agents touching the same file = merge hell | Collision Detective catches it in real time |
| Agents work, then go idle ā wasted compute | Dream Engine reflects during idle, runs counterfactuals |
| No verifiable record of agent decisions | Ed25519-signed Reputation Ledger ā tamper-proof receipts |
| Token bills explode across Opus / GPT / Gemini | Token Economy routes to cheapest model that passes confidence |
| Needs its own API key for everything | Agent-proxy mode reuses your existing Claude/Cursor/Codex config |
| Every tool runs hot, every key leaks | Air-Gap mode + ChaCha20 encryption at rest |
š 22 Novel Modules ā None Exist in Any Other Tool
This isn't a wrapper around someone else's API. All 22 are first-party research-grade implementations, persisted to disk, with real tests.
š§ Cognition
- Sub-Agent Brain Bridge (SABB) ā sync brain context into Claude Task / Cursor Composer / CrewAI / LangGraph / AutoGen sub-agents
- Causal Memory Chains ā every decision links to its causes; Graphviz DOT export
- Dream Engine ā idle-time reflection: revisit / counterfactual / consolidation / contradiction / pattern-discovery
- Swarm Debate Protocol ā pro / con / arbiter sub-agents for critical decisions
- Pre-Mortem Assistant ā surfaces past failures from your project before you start
- Branch Brains ā git-branch-aware memory context
š Transparency & Trust
- Agent Reputation Ledger ā Ed25519-signed receipts, portable accuracy score
- Attention Heatmap ā weighted attribution showing which memories shaped a decision
- Confidence Calibration Monitor ā Brier scores + automatic trust-weighting
- Formal Verification Bridge ā natural-language rules ā ESLint / Semgrep / LSP diagnostics
- Agent Collision Detective ā real-time overlap detection with advisory locks
š° Economy & Memory
- Token Economy Engine ā cross-agent spend, savings suggestions, routing advice
- Cost-Aware Sub-Agent Spawner ā auto-route trivial tasks to cheaper models
- Forgetting Curve + Sleep Consolidation ā Ebbinghaus-inspired biological memory
š Privacy & Safety
- Air-Gap Mode ā zero outbound network, localhost-only
- E2E Encryption ā ChaCha20-Poly1305 at rest
- Hallucination Quarantine ā isolate suspect memories, auto-expire in 7 days
⨠Delight & Network Effects
- Voice Mode ā natural-language intent parser for transcripts
- Brain Garden ā animated visualization of memory as a living constellation
- PR Auto-Review ā GitHub PR comments citing project memories
- Team Brain Sync (WebRTC) ā peer-to-peer shared brain, no server
- Brain Exchange ā export / import curated shareable brain slices
ā” Accelerators
- Local-First LLM ā Ollama default; optional Anthropic / OpenAI / OpenRouter / Moonshot / Gemini / DeepSeek / Mistral
- Hive Accelerator ā SSSP (arXiv 2504.17033) + TurboQuant (ICLR 2026) for fast causal traversal + 6Ć vector compression
š„ļø Complete Web Control Dashboard
Start it:
shadow-brain dash .
# ā http://localhost:7341/
28 tabs. Real-time data. Full control. Every feature has live monitoring + interactive controls. Preview:
![]() | ![]() | ![]() |
| Overview ā live counters, charts | Live Graph ā animated signal flow | Agents ā connect / disconnect per agent |
![]() | ![]() | ![]() |
| Chat with Brain ā RAG with citations | Memory Browser ā semantic search | SABB ā sliver generator + quarantine |
![]() | ![]() | ![]() |
| Causal Chains ā traceable decisions | Dream Engine ā reflection insights | Reputation ā Ed25519 leaderboard |
![]() | ![]() | ![]() |
| Token Economy ā $ saved live | Models & Intelligence ā 8 providers | āK Command Palette |
ā Browse all 29 tab screenshots
Features: dark + light theme Ā· command palette (āK) Ā· keyboard shortcuts Ā· toast notifications Ā· Chart.js analytics Ā· responsive (mobile / tablet / desktop) Ā· real-time WebSocket Ā· stop button that actually stops the process.
š§© Works With Every AI Coding Agent
| Agent | Adapter | Hook target |
|---|---|---|
| Claude Code | ā Native | ~/.claude/settings.json hooks.SessionStart |
| Cursor | ā Native | .cursor/rules/shadow-brain.md + MCP |
| Cline | ā Native | VS Code globalStorage MCP |
| Codex | ā Native | ~/.codex/config.json |
| GitHub Copilot | ā Native | .github/copilot-instructions.md |
| Windsurf | ā Native | .windsurfrules + MCP |
| Kilo Code | ā Native | ~/.kilocode/settings.json |
| Roo Code | ā Native | ~/.roocode/mcp.json |
| OpenCode | ā Native | AGENT.md |
| Aider | ā Native | .aider.conf.yml |
Custom agent? Add its config path in the dashboard "Custom Agent Paths" panel ā Shadow Brain will auto-read its provider + model + API key.
Sub-agent frameworks supported by SABB: Claude Task, Cursor Composer, Cline Sub-step, CrewAI, LangGraph, AutoGen, generic.
š¤ Use Your Own LLM ā or Your Agent's Already-Configured One
Shadow Brain's ModelRegistry supports 8 providers out of the box:
Ollama (default, local, free) Ā· Anthropic Claude Ā· OpenAI Ā· OpenRouter Ā· Moonshot / Kimi Ā· Google Gemini Ā· DeepSeek Ā· Mistral
Plus a unique Agent Proxy mode: if you already use Claude Code / Cursor / Codex with their own API key, Shadow Brain borrows their intelligence ā zero new API keys, zero cost.
Auto-discovery reads every agent config on your machine so you never retype a key.
š Real Numbers
| Metric | Value |
|---|---|
| Brain modules | 48 |
| CLI commands | 90+ |
| MCP tools | 60+ |
| REST endpoints | 50+ |
| Tests passing | 148 / 148 |
| TypeScript errors | 0 |
| Supported agents | 10 (plus custom) |
| Supported LLM providers | 8 (plus agent-proxy) |
| Novel features nobody else has | 22 |
| License | MIT |
| Cost to run | $0 forever (local-first) |
š 30-Second Quickstart
# 1. Install
npx @theihtisham/agent-shadow-brain@latest attach-all
# 2. Launch the dashboard
shadow-brain dash .
# ā open http://localhost:7341/
# 3. Seed the brain (optional ā populates example data)
shadow-brain reputation sign --agent claude-code --ver 4.7 --project demo \
--decision "use bcrypt cost 12 for all password hashing" \
--category security --confidence 0.92
# 4. Every new AI agent session automatically gets context injected
That's it. Open any project in Claude Code / Cursor / any supported agent ā Shadow Brain is already running under the hood.
š§Ŗ The Hive Mind Explainer (2 minutes)
ā¶ Click here to watch Ā· Full motion graphics explainer with voice-over walking through every feature, the live dashboard, and the 30-second install.
Local file: docs/launch/shadow-brain-motion-explainer-narrated.mp4 (2:05 Ā· 1080p Ā· narrated).
š CLI Reference (top commands)
# Attachment + lifecycle
shadow-brain attach-all # wire every detected agent
shadow-brain detach-all # remove every hook
shadow-brain audit-hooks # list what's installed
shadow-brain dash . # launch web dashboard at :7341
shadow-brain mcp # start MCP server at :7342
# v6 Hive Mind
shadow-brain hive status # cross-module status
shadow-brain subagent sliver --parent claude-code --task "refactor auth"
shadow-brain causal trace <id> # render ancestor DAG
shadow-brain dream run # trigger idle reflection now
shadow-brain debate "Redis or Postgres?" --context "10k users"
shadow-brain premortem "migrate auth to passkeys"
shadow-brain reputation sign --agent claude-code --ver 4.7 --project X \
--decision "..." --category security --confidence 0.92
shadow-brain reputation badge claude-code --ver 4.7
# Memory + analytics
shadow-brain global recall --keywords "auth"
shadow-brain tokens report # cross-agent spend + savings
shadow-brain forget consolidate # run sleep cycle
shadow-brain formal generate "always use parameterized SQL"
shadow-brain formal export-eslint
# Privacy + trust
shadow-brain airgap enable --policy strict
shadow-brain encrypt file ~/.shadow-brain/global.json --passphrase ...
shadow-brain quarantine list
# Sharing
shadow-brain exchange export --name "react-expert-v1" --tags react,auth
shadow-brain exchange import ~/brain-packs/react-expert-v1.json
# Full list
shadow-brain --help
šÆ Tweetable Talking Points
"Shadow Brain is the first open-source brain that works with sub-agents. Claude Task, Cursor Composer, CrewAI, LangGraph, AutoGen ā all finally share context. One
npxcommand. Zero API keys."
"Every AI decision Shadow Brain makes is Ed25519-signed. Every cause is traced. Every collision is caught before it happens. Free forever."
"22 novel features nobody else has. Free. Open source. Local-first.
npx @theihtisham/agent-shadow-brain."
š ļø For Contributors
git clone https://github.com/theihtisham/agent-shadow-brain.git
cd agent-shadow-brain
npm install
npm run build
npm test # 148/148 tests
npm run dev # ts-node dev mode
# Rebuild the explainer video
node tools/record-motion-explainer.mjs
# Capture fresh dashboard screenshots
node tools/capture-screenshots.mjs
# Seed the brain with demo data
node tools/seed-brain.mjs
Issues, PRs, discussions welcome. See CONTRIBUTING.md.
š Documentation
- CHANGELOG.md ā release notes
- docs/versions/v6.0.0.md ā v6 release details
- docs/launch/HIVEMIND_VIDEO.md ā video production pipeline
- docs/launch/screenshots/ ā all 29 dashboard screenshots
- SECURITY.md ā security policy
- CODE_OF_CONDUCT.md ā community guidelines
š¬ Community
- GitHub Issues ā bug reports, feature requests
- GitHub Discussions ā questions, ideas, show-and-tell
- GitHub Releases ā download the explainer MP4 + release assets
If Shadow Brain makes your AI agents smarter, star the repo ā
ā Stargazers Over Time
š License
MIT ā see LICENSE.
Free to use, modify, fork, commercialize. Local-first by default. Works offline, in air-gapped environments, in privacy-constrained enterprises. No telemetry. No phone-home. No trial expiration.
Built by @theihtisham
The Hive Mind for every AI coding agent on your machine.
npx @theihtisham/agent-shadow-brain@latest attach-all
Topics: ai Ā· llm Ā· claude-code Ā· cursor Ā· cline Ā· codex Ā· copilot Ā· hive-mind Ā· sub-agent Ā· sabb Ā· causal-chains Ā· dream-engine Ā· reputation-ledger Ā· swarm-debate Ā· pre-mortem Ā· branch-brain Ā· attention-heatmap Ā· token-economy Ā· forgetting-curve Ā· formal-verification Ā· calibration-monitor Ā· air-gap Ā· e2e-encryption Ā· hallucination-quarantine Ā· voice-mode Ā· brain-garden Ā· pr-review Ā· team-brain Ā· brain-exchange Ā· local-first Ā· ollama Ā· anthropic Ā· openai Ā· openrouter Ā· gemini Ā· deepseek Ā· moonshot Ā· mistral Ā· mcp-server Ā· model-context-protocol Ā· lsp-server Ā· cross-agent Ā· multi-agent Ā· autonomous-agents Ā· agentic-ai Ā· vibe-coding Ā· cursor-ai Ā· developer-tools Ā· developer-productivity Ā· coding-assistant Ā· ai-coding Ā· code-review Ā· static-analysis Ā· knowledge-graph Ā· semantic-search Ā· vector-embeddings Ā· prompt-caching Ā· json-mode Ā· chat-with-memory Ā· ed25519 Ā· chacha20-poly1305 Ā· sssp Ā· turboquant Ā· iclr-2026 Ā· arxiv Ā· zero-config Ā· typescript Ā· open-source Ā· free-forever Ā· mit-license











