skills$openclaw/hippocampus
impkind8.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).

8.5k stars6.3k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

namehippocampus
descriptionBackground 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.
ownerimpkind
repositoryimpkind/hippocampus-memory
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @impkind/hippocampus-memory
last updatedFeb 7, 2026

Maintainer

impkind

impkind

Maintains hippocampus in the OpenClaw Skills directory.

View GitHub profile
File Explorer
32 files
.
agentdir
AGENTS.md
4.0 KB
agents
hippocampus-agent.md
3.5 KB
prompts
consolidation-guide.md
1.7 KB
deep-inquiry.md
2.0 KB
encode-signals.md
330 B
process-recent.md
1.2 KB
recall-patterns.md
1.7 KB
relationship-detection.md
1.5 KB
self-reflect.md
1.2 KB
weekly-reflection-event.md
609 B
scripts
consolidate.sh
1.2 KB
decay.sh
3.3 KB
encode-pipeline.sh
9.1 KB
generate-dashboard.sh
23.5 KB
load-core.sh
1.4 KB
preprocess.sh
5.8 KB
recall.sh
3.0 KB
reflect.sh
829 B
summarize-pending.sh
4.2 KB
sync-core.sh
2.0 KB
templates
daily.md
165 B
_meta.json
812 B
ARCHITECTURE.md
8.1 KB
CONFIG-UPGRADE.md
1.9 KB
install.sh
7.2 KB
README.md
5.8 KB
SKILL.md
7.6 KB
SKILL.md

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

ScriptPurpose
preprocess.shExtract signals from conversation transcripts
encode-pipeline.shScore signals, prepare for LLM summarization
decay.shApply 0.99^days decay to all memories
recall.shSearch with importance weighting
load-core.shOutput high-importance memories for session start
sync-core.shGenerate HIPPOCAMPUS_CORE.md
consolidate.shWeekly review helper
reflect.shSelf-reflection prompts
generate-dashboard.shGenerate 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)

SignalScore
Explicit "remember this"0.9
Emotional/vulnerable content0.85
Preferences ("I prefer...")0.8
Decisions made0.75
Facts about people/projects0.7
General knowledge0.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

ScoreStatus
0.7+Core — loaded at session start
0.4-0.7Active — normal retrieval
0.2-0.4Background — specific search only
<0.2Archive 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.

PartFunctionStatus
hippocampusMemory formation, decay, reinforcement✅ Live
amygdala-memoryEmotional processing✅ Live
vta-memoryReward and motivation✅ Live
basal-ganglia-memoryHabit formation🚧 Development
anterior-cingulate-memoryConflict detection🚧 Development
insula-memoryInternal state awareness🚧 Development

References


Memory is identity. Text > Brain. If you don't write it down, you lose it.

README.md

🧠 Hippocampus

GitHub ClawdHub

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:

  1. Background encoding: A cron job extracts signals, scores them, and uses LLM to create concise summaries
  2. Automatic decay: Unused memories fade over time (daily cron)
  3. 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

DomainContents
user/Facts about the human
self/Agent identity & growth
relationship/Shared context & trust
world/External knowledge

Decay Timeline

Days UnusedRetention
793%
3074%
9040%

Cron Jobs

The encoding cron does:

  1. Extract signals from conversation
  2. Score by importance
  3. LLM compares to existing memories (semantic matching)
  4. Similar topic → Reinforce existing memory
  5. 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:

PartFunctionStatus
hippocampusMemory formation, decay, reinforcement✅ Live
amygdala-memoryEmotional processing✅ Live
vta-memoryReward and motivation✅ Live
basal-ganglia-memoryHabit formation🚧 Coming
anterior-cingulate-memoryConflict detection🚧 Coming
insula-memoryInternal 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.