灵枢AutoBrain

CrushHeart@crusheart-7

Plugin+skill hybrid pack for OpenClaw: memory, anti-hallucination, self-evolution, workflow orchestration, daily maintenance, auto-scan, version check. Exclusive plugin slot + compat layer.

Readme

OpenClaw Version Status

🦞 灵枢AutoBrain

Give your OpenClaw agent a brain — long-term memory, anti-hallucination, self-evolution, and workflow orchestration, out of the box.


✨ What It Does

AutoBrain is a plugin + skill hybrid pack that upgrades any OpenClaw agent from a stateless chatbot to a persistent, self-improving AI companion. It hooks into the agent lifecycle and deploys 62 Python engines across 8 engine groups + 3 subsystems — no manual setup required.

CapabilityWhat You Get
🧠 Long-term Memory5-layer memory (session → short-term → dream consolidation → archive → vector retrieval). Remembers who you are between sessions.
🛡️ Anti-HallucinationAuthority domain whitelist, knowledge assertion validation, multi-source cross-verification (16 engines).
🔄 Self-EvolutionLLM-as-Judge self-scoring + Reflexion reflection (failure pattern, root cause, fix strategy).
🎯 Dual-Mode + R-CCAMFast path for simple Q&A, deep reasoning for complex tasks. R-CCAM classifier for query complexity routing.
🩺 Health CheckDaily cron — engine status, disk space, gateway health, anomaly detection (0-100 scoring).
🔌 Failover + Error IsolationAuto-switch to backup model when primary fails. Circuit breaker with timeout protection, auto-retry, and checkpoint resume.
🔀 Workflow OrchestrationMulti-skill coordination, conflict detection, task routing, rule engine.
📋 Context Capsule (DAG)DAG-based context management with incremental summarization. SQLite-backed, retains message dependencies.
🔍 Enhanced RetrievalQuery rewriting + RRF fusion + retrieval confidence evaluation for higher recall accuracy.
🧵 Background Sub-AgentsAsync task dispatch + subagent spawn with heartbeat, timeout recovery, and SQLite persistence.

🚀 Quick Start

Prerequisites

  • OpenClaw ≥ 2026.5.0
  • Node.js ≥ 18
  • Python ≥ 3.10

Install

bash
# ⚠️

openclaw plugins install --dangerously-force-unsafe-install ./crusheart-plugin/

# Restart gateway
supervisorctl restart openclaw-gateway

Why --dangerously-force-unsafe-install? The plugin's index.js calls child_process to execute Python engines during bootstrap. This is a false positive — the code is local, not remote.

Verify

bash
openclaw plugins list | grep crusheart
# Bootstrap log should show:
#   ✅ Engine deployment complete
#   ✅ Init wizard: 8 steps passed
#   ✅ 2 cron jobs registered

🏗️ Architecture

text
openclaw-gateway
  │
  ├── crusheart-autobrain-turbo (plugin)
  │     ├── index.js                    ← Node.js bridge to 4 lifecycle hooks
  │     ├── bundle/crusheart-core.tar.gz  ← 62 Python engines (deployed at bootstrap)
  │     └── skill/                       ← OpenClaw skill metadata
  │
  ├── core/engines/                     ← Deployed to workspace (8 groups)
  │     ├── init/      (12)  — Config, session, context capsule, auto-loader
  │     ├── memory/     (7)  — 5-layer memory, vector index, dynamic profile
  │     ├── quality/   (11)  — Anti-hallucination, judge engine, anomaly detection
  │     ├── operations/ (7)  — Health check, decision core, autonomy cycle
  │     ├── workflow/   (6)  — Orchestrator, rule engine, serial lanes
  │     ├── tools/     (13)  — Failover, DB, template library, insight engine
  │     ├── hooks/      (4)  — Dual-mode classifier, self-evolution
  │     └── compat/     (2)  — Third-party engine adapter & registry
  │
  ├── core/pipeline/    (10)  — 10-stage message pipeline
  ├── core/planner/     (6)   — Goal parsing & task decomposition
  └── core/capability/  (1)   — Task graph models

📦 What's Included

ArtifactPathPurpose
Plugin entryindex.jsBridges Python engines into OpenClaw lifecycle hooks
Plugin manifestopenclaw.plugin.jsonOpenClaw plugin registration
Engine bundlebundle/crusheart-core.tar.gz62 Python engines + pipeline + planner
Skill metadataskill/_meta.jsonSkill marketplace registration
Skill docskill/SKILL.mdSkill documentation
Readme (this file)README.mdEnglish readme
Architecture referencebundle/ARCHITECTURE.mdFull architecture with file lookup
System rulesbundle/SOUL.mdIron rules for agent behavior (deployed to workspace)
Install guidebundle/INSTALL_GUIDE.mdInstallation wizard documentation
Auto-deployed scriptsbundle/*.py, bundle/*.sh8 scripts deployed to workspace scripts/

🔧 Configuration

Environment Variables (optional)

VariablePurposeDefault
EMBEDDING_API_URLRemote embedding service URL(local TF-IDF fallback)
EMBEDDING_API_KEYBearer token for embedding API(none)
FALLBACK_MODELBackup model when primary fails(user-configured)
CRUSHEART_PYTHONPython interpreter pathpython3

Without these, the system falls back to local TF-IDF vector search — slightly less accurate but fully functional.

Cron Jobs (auto-registered)

TimeNameDescription
0 1 * 0 0Unified maintenance + memory maintenanceHealth check + memory consolidation + system cleanup + dream scan + replay distill + execution review + memory scan/archive/index rebuild + skill scan
0 5 * 0 0Engine re-init + version checkinit_engines.py --bootstrap + version_check.py check for new release

Feedback: HIM603070@gmail.com