A living memory system for OpenClaw agents with importance scoring, time-based decay, and automatic reinforcementβjust like a real brain.
The hippocampus runs in the background, just like the real organ in your brain.
Your main agent is busy having conversationsβit can't constantly stop to decide what to remember. That's what the hippocampus does. It operates as a separate process:
- Background encoding: A cron job extracts signals, scores them, and uses LLM to create concise summaries
- Automatic decay: Unused memories fade over time (daily cron)
- Semantic reinforcement: When similar topics come up again, existing memories strengthen automatically
The main agent doesn't "think about" memoryβit just recalls what it needs, and the hippocampus handles the rest.
- Importance Scoring: Memories rated 0.0-1.0 based on signal type
- Time-Based Decay: Unused memories fade (0.99^days)
- Semantic Reinforcement: LLM detects similar topics β reinforces existing memories
- LLM Summarization: Raw messages β concise facts (via sub-agent)
- Fresh Install Friendly: Defaults to last 100 signals (not entire history)
- OpenClaw Integration: Bridges with memory_search via HIPPOCAMPUS_CORE.md
cd ~/.openclaw/workspace/skills/hippocampus
./install.sh # Basic (last 100 signals)
./install.sh --with-cron # With encoding + decay cron jobs
./install.sh --signals 50 # Custom signal limit
./install.sh --whole # Process entire historyOr via ClawdHub:
clawdhub install hippocampus# Load core memories at session start
./scripts/load-core.sh
# Search with importance weighting
./scripts/recall.sh "project deadline"
# Run encoding (usually via cron)
./scripts/encode-pipeline.sh
# Apply decay (usually via cron)
./scripts/decay.shVisual dashboard showing all installed brain skills.
Option 1: Auto-generated on install
./install.sh # Creates brain-dashboard.html automaticallyOption 2: Generate manually
./scripts/generate-dashboard.shOption 3: Open in browser
# macOS
open ~/.openclaw/workspace/brain-dashboard.html
# Linux
xdg-open ~/.openclaw/workspace/brain-dashboard.html
# Or open directly in browser:
# file:///home/USER/.openclaw/workspace/brain-dashboard.html- π§ Memory tab with stats and top memories
- π Emotions tab (if amygdala installed, or install prompt)
- β Drive tab (if VTA installed, or install prompt)
- Reads avatar/name from
IDENTITY.md - Auto-regenerates on every cron run (stays fresh)
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β Preprocess ββββββΆβ Score & ββββββΆβ LLM β
β signals β β Filter β β Summarize β
βββββββββββββββ βββββββββββββββ ββββββββ¬βββββββ
β
βββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β Semantic β β Store in β β Decay β
β Reinforce ββββββΆβ index.json βββββββ (0.99^days) β
β OR Create β β β β β
βββββββββββββββ βββββββββββββββ βββββββββββββββ
| Domain | Contents |
|---|---|
user/ |
Facts about the human |
self/ |
Agent identity & growth |
relationship/ |
Shared context & trust |
world/ |
External knowledge |
| Days Unused | Retention |
|---|---|
| 7 | 93% |
| 30 | 74% |
| 90 | 40% |
The encoding cron does:
- Extract signals from conversation
- Score by importance
- LLM compares to existing memories (semantic matching)
- Similar topic β Reinforce existing memory
- New topic β Create concise summary
# Encoding every 3 hours
openclaw cron add --name hippocampus-encoding \
--cron "0 0,3,6,9,12,15,18,21 * * *" \
--session isolated \
--agent-turn "Run hippocampus encoding..."
# Daily decay at 3 AM
openclaw cron add --name hippocampus-decay \
--cron "0 3 * * *" \
--session isolated \
--agent-turn "Run decay.sh..."- Python 3
- jq
- OpenClaw
Building cognitive architecture for AI agents:
| Part | Function | Status |
|---|---|---|
| hippocampus | Memory formation, decay, reinforcement | β Live |
| amygdala-memory | Emotional processing | β Live |
| vta-memory | Reward and motivation | β Live |
| basal-ganglia-memory | Habit formation | π§ Coming |
| anterior-cingulate-memory | Conflict detection | π§ Coming |
| insula-memory | Internal state awareness | π§ Coming |
Stanford Generative Agents: "Interactive Simulacra of Human Behavior" (Park et al., 2023)
MIT
Memory is identity. Text > Brain. Part of the AI Brain series.