Ultimate Unified Memory System (Overkill Memory System)
VERSION 1.9.3 (SPEED-FIRST)
A comprehensive 6-tier memory architecture with neuroscience integration, WAL protocol, and full automation for OpenClaw agents.
Overview
The Ultimate Unified Memory System implements a biologically-inspired, speed-first memory hierarchy. It provides persistent, contextual memory across agent sessions with automatic importance weighting, emotional tagging, and value-based retention.
Error Learning: Tracks and learns from user corrections
Spaced Repetition: FSRS-6 via Vestige for natural memory decay
Semantic Search: ChromaDB-powered vector storage for contextual retrieval
Cloud Backup: Supermemory integration for cross-device backup (NOT in query path)
Full Automation: Cron jobs for cross-session messages, platform posts, diary entries, and proactive memory maintenance
Speed Targets
Scenario
Time
Compiled query match
~0ms
Ultra-hot hit
~0.1ms
Hot cache hit
~1ms
Mem0 hit
~22ms
Full search
~55ms
Average
~5ms
Note: Supermemory is NOT in the query path - it's a background sync only (daily backup). This keeps queries fast (~5ms). Cloud access is only for backup/restore, not real-time queries.
Cron Inbox: Cross-session messages via cron-inbox.md
Platform Posts: Tracks Discord/Telegram posts in platform-posts.md
Diary Entry: Daily journal entries in diary/ directory
Daily Notes: Session logs in daily/ directory
Heartbeat State: Tracks periodic check timestamps
Installation & Setup
Prerequisites
# Ensure Python 3.8+ is available
python3 --version
# Optional: ChromaDB for semantic search
pip install chromadb
# Optional: Ollama for embeddings# Install from https://github.com/ollama/ollama
Step 1: Install the Skill
# The skill should be placed in your skills directory# ~/.openclaw/workspace/skills/overkill-memory-system/
Step 2: Configure Environment
Copy .env.example to .env and configure:
cp .env.example .env# Edit .env with your preferences
Step 3: Initialize Memory System
python3 cli.py init
This creates all required memory files:
~/.openclaw/memory/SESSION-STATE.md
~/.openclaw/memory/MEMORY.md
~/.openclaw/memory/cron-inbox.md
~/.openclaw/memory/platform-posts.md
~/.openclaw/memory/strategy-notes.md
~/.openclaw/memory/heartbeat-state.json
~/.openclaw/memory/diary/
~/.openclaw/memory/daily/
~/.openclaw/memory/chroma/
~/.openclaw/memory/git-notes/
CLI Commands
Initialization
# Initialize memory system files
python3 cli.py init
# Initialize with custom memory base path
python3 cli.py init --path /custom/path
Memory Operations
# Add a memory with auto-detected importance & emotions
python3 cli.py add "Finished the project, feeling accomplished!"# Add memory with explicit importance (0.0-1.0)
python3 cli.py add "Important decision made" --importance 0.9
# Add with explicit emotions
python3 cli.py add "Excited about the new feature" --emotions joy,curiosity
# Add with reward/value tracking
python3 cli.py add "Shipped v2.0" --reward accomplishment --intensity 0.8
Retrieval
# Search memories (hybrid - default, uses all optimizations)
python3 cli.py search "project updates"# Fast mode (cache + ultra-hot only)
python3 cli.py search "query" --fast
# Full search (all tiers)
python3 cli.py search "query" --full
# Get recent memories
python3 cli.py recent --limit 10
# Get memories by importance threshold
python3 cli.py important --threshold 0.7
Error Tracking (NEW)
# Track an error
python3 cli.py error track "Forgot to add import"# Show error patterns
python3 cli.py error patterns
# Show corrections made
python3 cli.py error corrections
# Error statistics
python3 cli.py error stats
# Search by file name (uses fd)
python3 cli.py file search "*.md"# Search by content (uses rg)
python3 cli.py file content "TODO"# Fast combined search
python3 cli.py file fast "pattern"
Knowledge Graph (NEW)
# Add atomic fact
python3 cli.py kg add --entity "people/kasper" --category "preference" --fact "Prefers TypeScript"# Supersede old fact
python3 cli.py kg supersede --entity "people/kasper" --old kasper-001 --fact "New fact"# Generate entity summary
python3 cli.py kg summarize --entity "people/kasper"# Search knowledge graph
python3 cli.py kg search "preference"# List all entities
python3 cli.py kg list
Self-Improving (NEW)
# Log an error
python3 cli.py improve error "Command failed" --context "details"# Log user correction
python3 cli.py improve correct "No, that's wrong" --context "user corrected me"# Log feature request
python3 cli.py improve request "Need markdown support"# Log best practice
python3 cli.py improve better "Use async for I/O" --context "found during work"# Get all learnings
python3 cli.py improve list
Neuroscience (NEW)
# Show neuroscience statistics
python3 cli.py neuro stats
# Analyze text for neuroscience scores
python3 cli.py neuro analyze "I'm excited about this project!"
Session Management
# Start new session (flushes WAL to daily)
python3 cli.py session new
# End session (commits WAL buffer)
python3 cli.py session end
# Show session state
python3 cli.py session status
Neuroscience Queries
# Get current emotional state
python3 cli.py brain state
# Get motivation/drive level
python3 cli.py brain drive
# Update emotional dimensions
python3 cli.py brain update --valence 0.8 --arousal 0.6
Daily & Diary
# Create daily note entry
python3 cli.py daily "What happened today"# Create diary entry (prompts for date)
python3 cli.py diary "Reflecting on the week"# List recent diary entries
python3 cli.py diary list --limit 5
Automation
# Process cron inbox messages
python3 cli.py cron process
# Sync platform posts
python3 cli.py sync posts
# Run memory analysis
python3 cli.py analyze
# Process cron inbox every 5 minutes
*/5 * * * * cd ~/.openclaw/workspace-cody/skills/overkill-memory-system && python3 cli.py cron process >> /var/log/memory-cron.log 2>&1
# Sync platform posts every 15 minutes
*/15 * * * * cd ~/.openclaw/workspace-cody/skills/overkill-memory-system && python3 cli.py sync posts >> /var/log/memory-sync.log 2>&1
# Daily diary entry at 9 PM
0 21 * * * cd ~/.openclaw/workspace-cody/skills/overkill-memory-system && python3 cli.py diary "Daily reflection" >> /var/log/memory-diary.log 2>&1
# Weekly memory analysis (Sunday 10 PM)
0 22 * * 0 cd ~/.openclaw/workspace-cody/skills/overkill-memory-system && python3 cli.py analyze >> /var/log/memory-analyze.log 2>&1
Heartbeat Integration
Add to HEARTBEAT.md:
## Memory System Checks- [ ] Check cron-inbox for cross-session messages
- [ ] Check platform-posts for new activity
- [ ] Review recent daily notes for important context
- [ ] Update emotional state if significantly changed
# Check if ChromaDB is running
curl http://localhost:8100/api/v1/heartbeat
# Or use keyword search fallback
python3 cli.py search "query" --method keyword
Ollama Embeddings Not Working
# Check Ollama is running
curl http://localhost:11434/api/tags
# Verify embedding model
ollama list
When Python imports cli.py, it may create memory directories under ~/.openclaw/memory/. This is intentional - the system needs these directories to function. To avoid this, run commands via subprocess rather than import.
No Auto-Installed Cron Jobs
The skill provides CLI commands for automation but does NOT auto-install cron jobs. You must manually add them if desired: