ImpKind

Hippocampus

AIエージェントv3.9.0
作者:ImpKind更新日 2026-05-18全 12 バージョン · 最新版の公開日 2026-02-11hippocampus@clawhub_impkind/hippocampus
メモリ強化#Memory System

AlphaMoatによると、2026-09時点でHippocampusのダウンロード数は4,645、スター数は4で、AIスキル全体5,078件中2,052位、AIエージェントでは969件中386位です。

インストール数
149
ダウンロード数
4645
スター数
4
総合順位
#2,052
全体の上位 41% · AIエージェントの上位 40%
プラットフォームインストール数ダウンロード数スター数コメント
ClawHub ↗14944454-
SkillHub ↗14846454—

プラットフォームごとに集計方法と集計時点が異なります。

このスキルでできること

会話の前処理、メモリのエンコード、検索、定期的な減衰、ダッシュボードを含み、自動実行を設定できます。全会話履歴を処理するオプションもあります。永続メモリは機微な会話内容を保持・再利用し、生成されたインデックスやダッシュボードも情報を残す可能性があります。スクリプトインジェクションとダッシュボード描画の問題が報告されており、共有・敵対的・高機密の環境で未修正のまま使用すべきではありません。会話アクセスを制限し、保存内容と定期ジョブを確認し、キーや機微な開示を保存しないでください。 記載のスクリプトには python3 と jq が必要です。

資料公開日 2026-10-29

できること

  • 承認済みの最近の会話から保存候補の記憶を選ぶ
  • 既存記憶を検索し、永続化範囲を確認する
  • 保持、減衰、削除をレビューする手順を計画する

使う場面

  • ユーザーがセッション間の記憶を明示的に望み、会話アクセス範囲を承認したとき
  • 永続ファイルと定期ジョブを確認し、関連するセキュリティ制約を受け入れた後

プロンプト例

スキルのドキュメントをもとに生成した例であり、実際の実行結果ではありません。

永続メモリがどの情報を読み取り保存するか説明し、プライバシー確認リストを提示してください。会話履歴の読み取り、スクリプト導入、cron作成、メモリ書き込みは行わないでください。

月次の推移

ダウンロード数4645
3123394147582026-03 · ダウンロード数 32362026-05 · ダウンロード数 38032026-06 · ダウンロード数 39452026-07 · ダウンロード数 42392026-08 · ダウンロード数 43642026-09 · ダウンロード数 464526-0326-09
スター数4
3452026-03 · スター数 42026-05 · スター数 42026-06 · スター数 42026-07 · スター数 42026-08 · スター数 42026-09 · スター数 426-0326-09

2026-09 から集計方法を変更し、同名スキルを作者ごとに分けて集計し、全スキルを対象にしました。破線は変更前の月で、変更後のデータとは直接比較せず、変更をまたぐ増減も計算していません。

月ダウンロード数前月比スター数
2026-094645—4
2026-084364+2.9%4
2026-074239+7.5%4
2026-063945+3.7%4
2026-053803—4
2026-033236—4

SKILL.md 原文

作者が公開した元のファイルをテキストのまま表示しています。AlphaMoat による編集や審査はしていません。リンクはクリックできません。コマンドは内容を確認してから実行してください。取得日 2026-10-23。

8.2 KB・ClawHub v3.9.0
---
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.9.0"
    author: "Community"
    repo: "https://github.com/ImpKind/hippocampus-skill"
すべて表示(全 301 行)
    requires:
      bins: ["python3", "jq"]
    install:
      - id: "manual"
        kind: "manual"
        label: "Run install.sh"
        instructions: "./install.sh --with-cron"
---

# Hippocampus - Memory System

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

```bash
# 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

```bash
./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:

```bash
./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`:

```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:

```bash
# 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:

```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:

```markdown
## 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

## Event Logging

Track hippocampus activity over time for analytics and debugging:

```bash
# Log an encoding run
./scripts/log-event.sh encoding new=3 reinforced=2 total=157

# Log decay
./scripts/log-event.sh decay decayed=154 low_importance=5

# Log recall
./scripts/log-event.sh recall query="user preferences" results=3
```

Events append to `~/.openclaw/workspace/memory/brain-events.jsonl`:
```json
{"ts":"2026-02-11T10:00:00Z","type":"hippocampus","event":"encoding","new":3,"reinforced":2,"total":157}
```

Use this for:
- Trend analysis (memory growth over time)
- Debugging encoding issues
- Building dashboards

## 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](https://www.clawhub.ai/skills/amygdala-memory) | Emotional processing | ✅ Live |
| [vta-memory](https://www.clawhub.ai/skills/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

- [Stanford Generative Agents Paper](https://arxiv.org/abs/2304.03442)
- [GitHub: joonspk-research/generative_agents](https://github.com/joonspk-research/generative_agents)

---

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

AIエージェントの人気スキル

ImpKindのその他のスキル

データ月:2026-09 · ダウンロード数、スター数、インストール数は公開スキルレジストリ(ClawHub、SkillHub)から月単位で集計しています。詳しくはデータの方法論をご覧ください。