8.5k★by impkind
hippocampus – OpenClaw Skill
hippocampus is an OpenClaw Skills integration for coding workflows. Background memory organ for AI agents. Runs separately from the main agent—encoding, decaying, and reinforcing memories automatically. Just like the real hippocampus in your brain. Based on Stanford Generative Agents (Park et al., 2023).
Skill Snapshot
| name | hippocampus |
| description | Background memory organ for AI agents. Runs separately from the main agent—encoding, decaying, and reinforcing memories automatically. Just like the real hippocampus in your brain. Based on Stanford Generative Agents (Park et al., 2023). OpenClaw Skills integration. |
| owner | impkind |
| repository | impkind/hippocampus-memory |
| language | Markdown |
| license | MIT |
| topics | |
| security | L1 |
| install | openclaw add @impkind/hippocampus-memory |
| last updated | Feb 7, 2026 |
Maintainer

name: hippocampus description: "Background memory organ for AI agents. Runs separately from the main agent—encoding, decaying, and reinforcing memories automatically. Just like the real hippocampus in your brain. Based on Stanford Generative Agents (Park et al., 2023)." metadata: openclaw: emoji: "🧠" version: "3.7.1" author: "Community" repo: "https://github.com/ImpKind/hippocampus-skill" requires: bins: ["python3", "jq"] install: - id: "manual" kind: "manual" label: "Run install.sh" instructions: "./install.sh --with-cron"
Hippocampus Skill
"Memory is identity. This skill is how I stay alive."
The hippocampus is the brain region responsible for memory formation. This skill makes memory capture automatic, structured, and persistent—with importance scoring, decay, and semantic reinforcement.
Quick Start
# Install (defaults to last 100 signals)
./install.sh --with-cron
# Load core memories at session start
./scripts/load-core.sh
# Search with importance weighting
./scripts/recall.sh "query"
# Run encoding manually (usually via cron)
./scripts/encode-pipeline.sh
# Apply decay (runs daily via cron)
./scripts/decay.sh
Install Options
./install.sh # Basic, last 100 signals
./install.sh --signals 50 # Custom signal limit
./install.sh --whole # Process entire conversation history
./install.sh --with-cron # Also set up cron jobs
Core Concept
The LLM is just the engine—raw cognitive capability. The agent is the accumulated memory. Without these files, there's no continuity—just a generic assistant.
Memory Lifecycle
PREPROCESS → SCORE → SEMANTIC CHECK → REINFORCE or CREATE → DECAY
Key insight: Reinforcement happens automatically during encoding. When a topic comes up again, the LLM recognizes it's about an existing memory and reinforces instead of creating duplicates.
Memory Structure
$WORKSPACE/
├── memory/
│ ├── index.json # Central weighted index
│ ├── signals.jsonl # Raw signals (temp)
│ ├── pending-memories.json # Awaiting summarization (temp)
│ ├── user/ # Facts about the user
│ ├── self/ # Facts about the agent
│ ├── relationship/ # Shared context
│ └── world/ # External knowledge
└── HIPPOCAMPUS_CORE.md # Auto-generated for OpenClaw RAG
Scripts
| Script | Purpose |
|---|---|
preprocess.sh | Extract signals from conversation transcripts |
encode-pipeline.sh | Score signals, prepare for LLM summarization |
decay.sh | Apply 0.99^days decay to all memories |
recall.sh | Search with importance weighting |
load-core.sh | Output high-importance memories for session start |
sync-core.sh | Generate HIPPOCAMPUS_CORE.md |
consolidate.sh | Weekly review helper |
reflect.sh | Self-reflection prompts |
generate-dashboard.sh | Generate unified brain dashboard HTML |
Brain Dashboard
Visual dashboard showing all installed brain skills:
./scripts/generate-dashboard.sh
open ~/.openclaw/workspace/brain-dashboard.html
- Auto-detects other brain skills (amygdala, VTA)
- Shows install prompts for missing skills
- Regenerates on install and cron runs
- Reads avatar/name from
IDENTITY.md
After Installation (for agents)
When you install this skill, notify the user about the dashboard:
🧠 Hippocampus installed!
View your agent's memories in the Brain Dashboard:
~/.openclaw/workspace/brain-dashboard.html
All scripts use $WORKSPACE environment variable (default: ~/.openclaw/workspace).
Importance Scoring
Initial Score (0.0-1.0)
| Signal | Score |
|---|---|
| Explicit "remember this" | 0.9 |
| Emotional/vulnerable content | 0.85 |
| Preferences ("I prefer...") | 0.8 |
| Decisions made | 0.75 |
| Facts about people/projects | 0.7 |
| General knowledge | 0.5 |
Decay Formula
Based on Stanford Generative Agents (Park et al., 2023):
new_importance = importance × (0.99 ^ days_since_accessed)
- After 7 days: 93% of original
- After 30 days: 74% of original
- After 90 days: 40% of original
Semantic Reinforcement
During encoding, the LLM compares new signals to existing memories:
- Same topic? → Reinforce (bump importance ~10%, update lastAccessed)
- Truly new? → Create concise summary
This happens automatically—no manual reinforcement needed.
Thresholds
| Score | Status |
|---|---|
| 0.7+ | Core — loaded at session start |
| 0.4-0.7 | Active — normal retrieval |
| 0.2-0.4 | Background — specific search only |
| <0.2 | Archive candidate |
Memory Index Schema
memory/index.json:
{
"version": 1,
"lastUpdated": "2025-01-20T19:00:00Z",
"decayLastRun": "2025-01-20",
"lastProcessedMessageId": "abc123",
"memories": [
{
"id": "mem_001",
"domain": "user",
"category": "preferences",
"content": "User prefers concise responses",
"importance": 0.85,
"created": "2025-01-15",
"lastAccessed": "2025-01-20",
"timesReinforced": 3,
"keywords": ["preference", "concise", "style"]
}
]
}
Cron Jobs
The encoding cron is the heart of the system:
# Encoding every 3 hours (with semantic reinforcement)
openclaw cron add --name hippocampus-encoding \
--cron "0 0,3,6,9,12,15,18,21 * * *" \
--session isolated \
--agent-turn "Run hippocampus encoding with semantic reinforcement..."
# Daily decay at 3 AM
openclaw cron add --name hippocampus-decay \
--cron "0 3 * * *" \
--session isolated \
--agent-turn "Run decay.sh and report any memories below 0.2"
OpenClaw Integration
Add to memorySearch.extraPaths in openclaw.json:
{
"agents": {
"defaults": {
"memorySearch": {
"extraPaths": ["HIPPOCAMPUS_CORE.md"]
}
}
}
}
This bridges hippocampus (index.json) with OpenClaw's RAG (memory_search).
Usage in AGENTS.md
Add to your agent's session start routine:
## Every Session
1. Run `~/.openclaw/workspace/skills/hippocampus/scripts/load-core.sh`
## When answering context questions
Use hippocampus recall:
\`\`\`bash
./scripts/recall.sh "query"
\`\`\`
Capture Guidelines
What Gets Captured
- User facts: Preferences, patterns, context
- Self facts: Identity, growth, opinions
- Relationship: Trust moments, shared history
- World: Projects, people, tools
Trigger Phrases (auto-scored higher)
- "Remember that..."
- "I prefer...", "I always..."
- Emotional content (struggles AND wins)
- Decisions made
AI Brain Series
This skill is part of the AI Brain project — giving AI agents human-like cognitive components.
| 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 | 🚧 Development |
| anterior-cingulate-memory | Conflict detection | 🚧 Development |
| insula-memory | Internal state awareness | 🚧 Development |
References
Memory is identity. Text > Brain. If you don't write it down, you lose it.
🧠 Hippocampus
A living memory system for OpenClaw agents with importance scoring, time-based decay, and automatic reinforcement—just like a real brain.
The Concept
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.
Features
- 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
Installation
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 history
Or via ClawdHub:
clawdhub install hippocampus
Quick Usage
# 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.sh
Brain Dashboard
Visual dashboard showing all installed brain skills.
Access the Dashboard
Option 1: Auto-generated on install
./install.sh # Creates brain-dashboard.html automatically
Option 2: Generate manually
./scripts/generate-dashboard.sh
Option 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
Features
- 🧠 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)
How It Works
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Preprocess │────▶│ Score & │────▶│ LLM │
│ signals │ │ Filter │ │ Summarize │
└─────────────┘ └─────────────┘ └──────┬──────┘
│
┌─────────────────────────────────────┘
│
▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Semantic │ │ Store in │ │ Decay │
│ Reinforce │────▶│ index.json │◀────│ (0.99^days) │
│ OR Create │ │ │ │ │
└─────────────┘ └─────────────┘ └─────────────┘
Memory Domains
| Domain | Contents |
|---|---|
user/ | Facts about the human |
self/ | Agent identity & growth |
relationship/ | Shared context & trust |
world/ | External knowledge |
Decay Timeline
| Days Unused | Retention |
|---|---|
| 7 | 93% |
| 30 | 74% |
| 90 | 40% |
Cron Jobs
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..."
Requirements
- Python 3
- jq
- OpenClaw
AI Brain Series
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 |
Based On
Stanford Generative Agents: "Interactive Simulacra of Human Behavior" (Park et al., 2023)
License
MIT
Memory is identity. Text > Brain. Part of the AI Brain series.
Permissions & Security
Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.
Requirements
- OpenClaw CLI installed and configured.
- Language: Markdown
- License: MIT
- Topics:
FAQ
How do I install hippocampus?
Run openclaw add @impkind/hippocampus-memory in your terminal. This installs hippocampus into your OpenClaw Skills catalog.
Does this skill run locally or in the cloud?
OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.
Where can I verify the source code?
The source repository is available at https://github.com/openclaw/skills/tree/main/skills/impkind/hippocampus-memory. Review commits and README documentation before installing.
