Persistent memory system for AI agents. Automatic encoding, decay, and semantic reinforcement — just like the hippocampus in your brain. Based on Stanford Generative Agents (Park et al., 2023).
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install hippocampus-memory或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install hippocampus-memory⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/hippocampus-memory/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: hippocampus-memory title: "Hippocampus - Memory System" description: "Persistent memory system for AI agents. Automatic encoding, decay, and semantic reinforcement — just like the hippocampus in your brain. Based on Stanford Generative Agents (Park et al., 2023)." metadata: openclaw: emoji: "🧠" version: "3.8.6" 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" ---
> "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.
# 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.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
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.
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.
$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
| 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 |
Visual dashboard showing all installed brain skills:
./scripts/generate-dashboard.sh
open ~/.openclaw/workspace/brain-dashboard.html
IDENTITY.mdWhen 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).
| 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 |
Based on Stanford Generative Agents (Park et al., 2023):
new_importance = importance × (0.99 ^ days_since_accessed)
During encoding, the LLM compares new signals to existing memories:
This happens automatically—no manual reinforcement needed.
| 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.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"]
}
]
}
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"
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).
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"
\`\`\`
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 |
---
Memory is identity. Text > Brain. If you don't write it down, you lose it.
安装 Hippocampus 后,可以对 AI 说这些话来触发它
Help me get started with Hippocampus
Explains what Hippocampus does, walks through the setup, and runs a quick demo based on your current project
Use Hippocampus to persistent memory system for AI agents
Invokes Hippocampus with the right parameters and returns the result directly in the conversation
What can I do with Hippocampus in my documents & notes workflow?
Lists the top use cases for Hippocampus, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/hippocampus-memory/ 目录(个人级,所有项目可用),或 .claude/skills/hippocampus-memory/(项目级)。重启 AI 客户端后,用 /hippocampus-memory 主动调用,或让 AI 根据上下文自动发现并使用。
Hippocampus 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Hippocampus 可免费安装使用。请查阅仓库了解许可证信息。
Persistent memory system for AI agents. Automatic encoding, decay, and semantic reinforcement — just like the hippocampus in your brain. Based on Stanford Generative Agents (Park et al., 2023).
Hippocampus 属于「Documents & Notes」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my documents & notes tasks using Hippocampus
Identifies repetitive steps in your workflow and sets up Hippocampus to handle them automatically