skills$openclaw/hippocampus
impkind7.1k

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).

7.1k stars723 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
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @impkind/hippocampus
last updatedFeb 7, 2026

Maintainer

impkind

impkind

Maintains hippocampus in the OpenClaw Skills directory.

View GitHub profile
File Explorer
30 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
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
capture.sh
817 B
consolidate.sh
1.2 KB
decay.sh
3.2 KB
load-core.sh
1.4 KB
preprocess.sh
2.5 KB
recall.sh
3.9 KB
reflect.sh
829 B
reinforce.sh
2.4 KB
sync-core.sh
2.0 KB
templates
daily.md
165 B
_meta.json
629 B
ARCHITECTURE.md
8.1 KB
CONFIG-UPGRADE.md
1.9 KB
install.sh
3.5 KB
README.md
3.5 KB
SKILL.md
6.2 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.2.0" 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 reinforcement.

Quick Start

# Install
./install.sh --with-cron

# Load core memories
./scripts/load-core.sh

# Search with importance weighting
./scripts/recall.sh "query" --reinforce

# Apply decay (runs daily via cron)
./scripts/decay.sh

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

CAPTURE → SCORE → STORE → DECAY/REINFORCE → RETRIEVE
   ↑                                            │
   └────────────────────────────────────────────┘

Memory Structure

$WORKSPACE/
├── memory/
│   ├── index.json           # Central weighted index
│   ├── 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
decay.shApply 0.99^days decay to all memories
reinforce.shBoost importance when memory is used
recall.shSearch with importance weighting
load-core.shOutput high-importance memories
sync-core.shGenerate HIPPOCAMPUS_CORE.md
preprocess.shExtract signals from transcripts

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

Reinforcement Formula

When a memory is accessed and useful:

new_importance = old + (1 - old) × 0.15

Each use adds ~15% of remaining headroom toward 1.0.

Thresholds

ScoreStatus
0.7+Core — high priority
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",
  "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

Set up via OpenClaw cron:

# Daily decay at 3 AM
openclaw cron add --name hippocampus-decay \
  --cron "0 3 * * *" \
  --session main \
  --system-event "🧠 Run: WORKSPACE=\$WORKSPACE decay.sh"

# Weekly consolidation
openclaw cron add --name hippocampus-consolidate \
  --cron "0 21 * * 6" \
  --session main \
  --system-event "🧠 Weekly consolidation time"

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" --reinforce
\`\`\`

Capture Guidelines

What to Capture

  • User facts: Preferences, patterns, context
  • Self facts: Identity, growth, opinions
  • Relationship: Trust moments, shared history
  • World: Projects, people, tools

Trigger Phrases

Auto-capture when you hear:

  • "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
basal-ganglia-memoryHabit formation🚧 Development
anterior-cingulate-memoryConflict detection🚧 Development
insula-memoryInternal state awareness🚧 Development
vta-memoryReward and motivation🚧 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 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 or separate agent watches conversations and encodes important signals into memory
  2. Automatic decay: Unused memories fade over time (daily cron)
  3. Reinforcement on recall: When memories are accessed, they strengthen automatically

The main agent doesn't "think about" memory—it just recalls what it needs, and the hippocampus handles the rest. Like a real brain.

Features

  • Importance Scoring: Memories rated 0.0-1.0 based on signal type
  • Time-Based Decay: Unused memories fade (0.99^days)
  • Reinforcement: Used memories strengthen (+15% headroom)
  • Background Processing: Encoding runs via cron, not in main agent's context
  • OpenClaw Integration: Bridges with memory_search via HIPPOCAMPUS_CORE.md

Installation

cd ~/.openclaw/workspace/skills/hippocampus
./install.sh --with-cron

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" --reinforce

# Manually boost a memory
./scripts/reinforce.sh mem_001 --boost

# Apply decay (usually via cron)
./scripts/decay.sh

How It Works

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│   Capture   │────▶│   Score &   │────▶│   Store in  │
│  (encoding) │     │   Classify  │     │  index.json │
└─────────────┘     └─────────────┘     └──────┬──────┘
                                               │
                    ┌──────────────────────────┘
                    │
                    ▼
┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│    Decay    │◀───▶│   Retrieve  │────▶│  Reinforce  │
│ (0.99^days) │     │  (recall.sh)│     │   on use    │
└─────────────┘     └─────────────┘     └─────────────┘

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%

Requirements

  • Python 3
  • jq
  • OpenClaw

Based On

Stanford Generative Agents: "Interactive Simulacra of Human Behavior" (Park et al., 2023)

License

MIT


Memory is identity. Text > Brain.

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 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. Review commits and README documentation before installing.