The Hippocampus Protocol
A Memory Indexing Protocol for AI Agents
Authors: The Authors • Status: Implemented (January 31, 2026)
Part of: defrag.md · synapse.md · hippocampus.md · neocortex.md
Abstract
AI agents accumulate memory across files, databases, and conversation histories — but they lack a principled way to find what they've stored. Current approaches range from full-context loading (expensive, noisy) to vector similarity search (lossy, infrastructure-heavy). Neither mirrors how biological memory actually works.
The hippocampus — the brain's memory indexing structure — doesn't store memories. It stores a sparse index of where memories live across the neocortex. Retrieval starts with the index, which points to distributed storage. This separation of index from content is what makes biological memory both efficient and robust.
hippocampus.md proposes a protocol for AI agent memory indexing inspired by hippocampal indexing theory (Teyler & DiScenna, 1986). The specification defines: a lightweight, human-readable index format; biologically-grounded decay functions for memory strength; retrieval strategies that mirror pattern completion; and maintenance cycles aligned with sleep consolidation.
The result: agents that know where their memories are without reading all of them. Retrieval costs drop 5–10× compared to full scan. Index maintenance costs ~$2/month. And the approach works with plain markdown — no vector database required.
1. The Problem: Lost in Your Own Memory
An AI agent running for weeks accumulates dozens of files. Daily logs, project notes, conversation summaries, configuration records, lessons learned. A typical workspace after one month:
memory/ ├── 2026-01-01.md through 2026-01-31.md (31 files) ├── archive/2025-12.md (1 file) ├── heartbeat-state.json (1 file) ├── known-users.json (1 file) projects/ ├── alpha/PROJECT.md (5+ projects) ├── beta/PROJECT.md ├── ... MEMORY.md (1 file) TOOLS.md (1 file)
That's 40–100+ files containing the agent's accumulated knowledge. When the agent needs to answer “What was the deploy command for project Alpha?” it faces a choice:
Option A: Read everything. Load all files into context. At ~2KB per file, 100 files = ~200KB = ~50,000 tokens. At $5/million input tokens, that's $0.25 per query. For 50 queries/day, that's $12.50/day — $375/month.
Option B: Grep and hope. Fast and cheap, but brittle. “deploy command” might be phrased as “push to production” in the actual file. Semantic gaps break keyword search.
Option C: Vector search. Better than grep, but requires infrastructure (embedding model, vector DB, ingestion pipeline). The agent now depends on external services for basic memory.
Option D: Ask the LLM to remember. Rely on the conversation history window. Works for recent context, fails for anything beyond the current session.
None of these mirror how biological memory works. The brain doesn't read every neuron to recall a fact. It uses an index.
The Cost of Not Having an Index
| Method | Tokens/Query | Cost/Query | Monthly (50/day) |
|---|---|---|---|
| Full scan (all files) | ~48,000 | $0.24 | $360 |
| Grep + top-5 files | ~8,000 | $0.04 | $60 |
| Vector search + 3 chunks | ~2,500 | $0.013 | $19 + DB costs |
| HIPPOCAMPUS.md + 2 files ✦ | ~3,500 | $0.018 | $27 |
The index approach is 13× cheaper than full scan, competitive with vector search, and requires zero infrastructure beyond the files themselves.
2. Biological Foundation
2.1 The Hippocampal Memory Indexing Theory
In 1986, Timothy Teyler and Pascal DiScenna proposed a theory that reframed how neuroscientists understand the hippocampus. Their claim was simple and radical: the hippocampus doesn't store memories. It stores an index.
When you experience an event — say, a conversation with a friend at a café — multiple neocortical regions activate simultaneously. The visual cortex processes the friend's face. The auditory cortex processes their words. The olfactory cortex registers the coffee smell.
The hippocampus receives convergent input from all these regions. It doesn't store the full sensory experience. Instead, it creates a sparse activation pattern — an index entry — that records which neocortical regions were co-activated. This index entry is the pointer. The memories themselves remain distributed across the cortex.
When you later try to recall the conversation, a partial cue — perhaps the smell of coffee — reactivates the hippocampal index. The index then projects back to the neocortex, reinstating the full original pattern. Retrieval is index-guided pattern completion.
2.2 Complementary Learning Systems
The hippocampal indexing theory gains its full explanatory power within the Complementary Learning Systems (CLS) framework (McClelland, McNaughton & O'Reilly, 1995). CLS explains why the brain needs two memory systems:
| Property | Hippocampus | Neocortex |
|---|---|---|
| Learning rate | Fast — one-shot encoding | Slow — gradual extraction |
| Storage style | Sparse, separated patterns | Overlapping, distributed |
| Purpose | Specific episodes | Statistical regularities |
| Failure mode | Limited capacity | Catastrophic interference |
| Timescale | Seconds to hours | Days to years |
For AI agents, CLS maps directly to a two-tier architecture:
- Fast buffer (daily logs,
memory/*.md) = hippocampal encoding - Slow store (curated
MEMORY.md) = neocortical knowledge - Index (
HIPPOCAMPUS.md) = the bridge between them
2.3 Pattern Separation and Pattern Completion
Two hippocampal subregions implement complementary operations critical for indexing:
Pattern Separation (Dentate Gyrus): Transforms similar inputs into highly distinct outputs. With only ~5% of granule cells active at any time, it creates sparse, orthogonal representations. Two similar experiences get distinct index entries even though they share many features.
Pattern Completion (CA3): Acts as an autoassociator — a network that can reconstruct a full pattern from a partial cue. Given just 20% of the original input, CA3 recovers approximately 50% of the stored pattern. This enables retrieval from fragmentary cues.
| Operation | Region | Function | Agent Analog |
|---|---|---|---|
| Pattern Separation | Dentate Gyrus | Write dedup — distinct keys for similar events | Separate index entries for similar topics |
| Pattern Completion | CA3 | Full retrieval from partial query | Partial keyword → full memory location |
2.4 Engrams: Not All Memory Components Are Equal
Susumu Tonegawa's lab at MIT demonstrated that memory engrams consist of multiple non-overlapping subpopulations. Critically, only certain sub-engrams were necessary and sufficient for recall. Even more remarkably, memories can exist as “silent engrams” — the engram persists; only the retrieval pathway is impaired.
2.5 Multi-Dimensional Indexing
The hippocampus indexes along at least three dimensions simultaneously, using specialized cell types:
| Brain Dimension | Agent Dimension | Index Field |
|---|---|---|
| Space (where) | File location | files: [path1, path2] |
| Time (when) | Timestamp | created, last_accessed |
| Context (what situation) | Topic/domain | tags: [deploy, auth, bug] |
| Emotional valence | Priority | strength: 0.85 |
| Associations | Cross-references | related: [entry_a, entry_b] |
3. Current Approaches and Their Limits
3.1 The Landscape
| System | Index Type | Decay | Consolidation | Bio-Inspiration |
|---|---|---|---|---|
| MemGPT/Letta | Vector + recency | None | None | Low (OS metaphor) |
| Mem0 | Vector + graph | Basic DELETE | None | Low |
| MemoryOS | Heat-based + semantic | Heat decay | Heat promotion | Medium |
| MemOS | MemCubes | Lifecycle | Fusion/transition | Low (OS metaphor) |
| LangChain | Vector/KG/buffer | None | Summary (weak) | None |
| Cortex Memory | Vector (Qdrant) | None | None | None |
None of these systems implement biological-style sparse indexing. All conflate storage with retrieval — the index is the memory, not a pointer to it.
3.2 MemGPT/Letta: The OS Metaphor
MemGPT introduced the influential idea of treating LLM memory like an operating system: core memory as RAM, archival as disk, with the LLM acting as its own memory manager. No explicit index. At 74% on the LoCoMo benchmark, there's significant room for improvement.
3.3 Mem0: Operations Without Architecture
Mem0 offers the cleanest operation model: ADD, UPDATE, DELETE, NOOP. 26% higher accuracy than OpenAI Memory on LOCOMO. But no temporal indexing, no consolidation cycles, no biological decay curves. No equivalent of sleep.
3.4 MemoryOS: Closest to Biology
MemoryOS comes closest with heat-based promotion. 4.9 LLM calls per response (vs. 13 for competitors). 3,874 tokens retrieved per response (vs. 16,977 for MemGPT). But heat is a single scalar and MemoryOS still lacks an explicit index.
3.5 The Gap Nobody Has Filled
| # | Missing Capability | Biological Basis |
|---|---|---|
| 1 | Sparse indexing separate from storage | Hippocampal indexing theory |
| 2 | Power-law decay for memory strength | Ebbinghaus forgetting curve |
| 3 | Sleep-like consolidation cycles | SWS replay |
| 4 | Pattern separation for deduplication | Dentate gyrus sparse coding |
| 5 | Pattern completion from partial cues | CA3 autoassociation |
| 6 | Reconsolidation on retrieval | Nader et al. (2000) |
| 7 | Multi-dimensional indexing | Place/grid/time cells |
| 8 | Emotional priority tagging | Amygdala modulation |
| 9 | Silent engrams (dormant but recoverable) | Tonegawa lab |
| 10 | Index ≠ memory as architectural principle | Core hippocampal theory |
hippocampus.md addresses capabilities 1–10 through a protocol that any file-based agent can adopt.
4. The hippocampus.md Protocol
4.1 Core Principle: The Index Is Not The Memory
Current systems conflate these. Vector databases store embeddings AND use them for retrieval. MemGPT's core memory IS in-context AND serves as the retrieval surface. hippocampus.md separates them:
- Storage: Distributed across files (MEMORY.md, daily logs, project notes, archives)
- Index: A single lightweight file (HIPPOCAMPUS.md) containing sparse pointers
- Retrieval: Index-first, with fallback to exhaustive search
- Maintenance: Periodic consolidation keeps the index current
4.2 How It Works
User Query: "What's the deploy command for Acme?"
│
▼
┌─────────────────────────────────┐
│ HIPPOCAMPUS.md │ ← Agent reads index (~3K tokens)
│ │
│ ## Acme API │
│ - Deploy: TOOLS.md §Vercel │ ← Pointer found
│ - Architecture: projects/ │
│ acme.ai/PROJECT.md │
│ strength: 0.92 | tags: deploy │
└────────────────┬────────────────┘
│
▼
┌─────────────────────────────────┐
│ TOOLS.md §Vercel │ ← Load only relevant section (~500 tokens)
│ │
│ Deploy: cd ~/clawd/projects/ │
│ acme.ai && npx vercel... │
└─────────────────────────────────┘
│
▼
Answer + Update Index
(last_accessed = now,
access_count += 1,
strength recalculated)
Total tokens: ~3,500 (vs ~48,000 full scan)4.3 The Retrieval Flow
1. Agent receives query
2. Read HIPPOCAMPUS.md — scan for matching entries by topic, tags, or keywords
3. If match found (strength > threshold): Follow pointer(s) to specific file(s) and section(s). Update index entry.
4. If weak match (strength < threshold): Follow pointer anyway, but also trigger fallback search.
5. If no match: Fall back to memory_search or grep. If found, create new index entry for future retrieval.
This hybrid approach mirrors biology: the hippocampus attempts pattern completion first (fast path), but the brain can also perform slower cortical search when the index fails.
5. Index Schema
5.1 Entry Format
## Acme API Deployment
Deploy command, Vercel setup, domain config.
→ TOOLS.md §Vercel | projects/acme.ai/PROJECT.md
<!-- hx: id=acme-deploy | created=2026-01-10 | accessed=2026-01-31
| hits=23 | str=0.92 | tags=deploy,vercel,acme
| rel=railway-services,cloudflare-dns -->Anatomy: Heading (##) = the topic. Summary line = compressed representation. Pointers (→) = file paths with optional section markers (§). Metadata (<!-- hx: ... -->) = machine-readable fields for decay and maintenance.
5.2 Metadata Fields
| Field | Type | Required | Description | Bio Analog |
|---|---|---|---|---|
| id | string | Yes | Unique entry identifier | Engram ID |
| created | date | Yes | When first indexed | Encoding timestamp |
| accessed | date | Yes | Last retrieval event | Last retrieval |
| hits | integer | Yes | Total retrieval count | Synaptic strength |
| str | float (0–1) | Yes | Current strength score | Engram accessibility |
| tags | string[] | Recommended | Context/domain tags | Contextual neurons |
| rel | string[] | Recommended | Related entry IDs | Associative connections |
| pri | enum | Optional | amygdala / normal / low | Amygdala modulation |
| src | enum | Optional | defrag / manual / retrieval / auto | Encoding context |
| ver | integer | Optional | Times entry modified | Reconsolidation count |
5.3 Section Organization
# HIPPOCAMPUS.md — Memory Index <!-- hippocampus.md v1.0 | entries: 127 | reindexed: 2026-01-31T02:30:00Z --> ## Quick Access <!-- Most-accessed entries, sorted by hits. Pattern completion starts here. --> ## By Topic ### Projects ### People ### Infrastructure ### Technical Knowledge ## By Time ### This Week ### This Month ### Older ## Associations <!-- Cross-reference map: which entries relate to which --> ## Decay Queue <!-- Entries below strength threshold, candidates for pruning --> ## Meta <!-- Index statistics, last maintenance, health metrics -->
6. Retrieval Strategies
6.1 Three Modes
Strategy 1: Index-First (Hippocampal Path)
Query → HIPPOCAMPUS.md → Match entry → Follow pointer → Answer
Fastest and cheapest. For known entities and common queries.
Strategy 2: Search-First (Cortical Path)
Query → grep/vector search across files → Rank results → Answer → Update index
Exhaustive but expensive. For novel queries.
Strategy 3: Hybrid (Biological Default) ← RECOMMENDED
Query → HIPPOCAMPUS.md → If match (str > 0.3) → Follow pointer → Answer
→ If no match → Search → Answer → Create index entry
Best overall: fast when index has the answer, thorough when it doesn't.
Index improves with every use.6.2 Strength Threshold
| Strength Range | Meaning | Action |
|---|---|---|
| 0.8–1.0 | Strong — recently accessed, frequently used | Direct retrieval, high confidence |
| 0.5–0.79 | Moderate — valid but aging | Direct retrieval, consider refreshing |
| 0.3–0.49 | Weak — old, rarely used | Retrieve but also verify via search |
| 0.1–0.29 | Decaying — candidate for pruning | Listed in Decay Queue |
| 0.0–0.09 | Silent engram — effectively forgotten | Not returned; recoverable via full search |
7. Decay and Forgetting
7.1 The Power Law
Ebbinghaus demonstrated in 1885 that forgetting follows a characteristic curve — rapid initial loss, then slow asymptotic decline. Wixted (2004) formalized this as a power law:
strength(t) = initial × (1 + decay_rate × t) ^ (-forgetting_rate) Where: initial = strength at encoding (default: 1.0) decay_rate = time scaling factor (default: 0.1) t = hours since last access forgetting_rate = how fast strength drops (default: 0.3)
| Time Since Access | Strength |
|---|---|
| 1 hour | 0.97 |
| 1 day | 0.72 |
| 1 week | 0.52 |
| 1 month | 0.36 |
| 3 months | 0.25 |
| 6 months | 0.20 |
| 1 year | 0.16 |
7.2 Factors That Modify Decay
| Factor | Effect on Decay | Implementation |
|---|---|---|
| Emotional arousal | Slows decay dramatically | pri=amygdala → decay frozen |
| Retrieval practice | Resets decay clock | accessed updates reset curve |
| Encoding depth | Slower decay | Manual entries get 0.5× decay |
| Associative connections | Well-connected = slower | 3+ rel links get 0.7× decay |
| Sleep consolidation | Replayed memories strengthen | defrag cycle boosts strength |
| Spaced repetition | Distributed > massed | Multiple days boost more than same-day |
7.3 Forgetting Is a Feature
Biological forgetting isn't failure — it's optimization:
- Reduces interference — fewer competing entries during retrieval
- Improves generalization — detail loss leaves useful gist
- Saves resources — smaller index = faster search
- Maintains relevance — the index reflects current needs
The human brain prunes ~50% of its synapses between age 2 and adulthood. This pruning improves cognitive function. Similarly, an agent that prunes its index regularly will retrieve more accurately than one that retains everything.
8. Maintenance Cycles
8.1 Biological Sleep as Maintenance
During slow-wave sleep, the hippocampus replays the day's experiences to the neocortex via sharp-wave ripples (140–220 Hz), compressed 5–20× faster than the original experience. Sleep isn't passive rest — it's active memory maintenance.
8.2 Agent Maintenance Protocol
1. Recalculate strength scores for all entries (power-law decay) 2. Add entries for any new files or significant events 3. Update access metadata for entries used since last maintenance 4. Move entries below str=0.1 to Decay Queue Duration: ~2,000 tokens of index operations
1. Full consistency check: every pointer → verify file exists 2. Prune Decay Queue entries below str=0.05 3. Merge closely related entries (pattern separation maintenance) 4. Rebuild association links based on co-access patterns 5. Compress index: remove redundant summary text 6. Update §Quick Access with current top-20 by hits Duration: ~10,000 tokens
1. Promote stable patterns: entries with str>0.8 for 30+ days → "consolidated" 2. Archive: Decay Queue entries for 30+ days → archive or delete 3. Schema evolution: identify emerging topic clusters, create new sections 4. Temporal cleanup: remove aged-out §This Week/§This Month entries 5. Cross-reference audit: identify orphaned entries with no rel links 6. Index health report: total entries, average strength, decay distribution Duration: ~30,000 tokens
8.3 Integration with defrag.md
hippocampus.md is designed to work with the defrag.md sleep consolidation protocol. During a defrag cycle:
- defrag.md scans daily logs and consolidates important content into MEMORY.md
- hippocampus.md index is updated: new pointers for consolidated content
- Strength boost: Entries that defrag reviewed get a strength boost (sleep replay)
- New entries: Content defrag deemed important gets new index entries automatically
The two protocols form a complete sleep cycle: defrag.md = what to remember (content consolidation). hippocampus.md = where to find it (index maintenance).
9. Scaling
9.1 The Sweet Spot: 10–200 Files
| File Count | Index Entries | Index Size | Tokens |
|---|---|---|---|
| 10 | ~30–50 | ~2–4 KB | ~500–1,000 |
| 50 | ~100–250 | ~8–20 KB | ~2,000–5,000 |
| 100 | ~200–500 | ~15–40 KB | ~4,000–10,000 |
| 200 | ~400–1,000 | ~30–80 KB | ~8,000–20,000 |
9.2 Hierarchical Indexing: 200+ Files
HIPPOCAMPUS.md # Master index (~200 top entries, <10K tokens) ├── .hippocampus/ │ ├── topics/ │ │ ├── projects.md # Detailed project index │ │ ├── people.md # People and relationships │ │ └── technical.md # Technical knowledge index │ ├── temporal/ │ │ ├── 2026-01.md # January temporal index │ │ └── 2026-02.md # February temporal index │ └── meta.json # Index health, statistics
9.3 When to Use External Infrastructure
| Scale | Recommended Approach |
|---|---|
| 1–200 files | Single HIPPOCAMPUS.md, pure markdown |
| 200–1,000 files | Hierarchical .hippocampus/ directory |
| 1,000–10,000 entries | Markdown index + vector search fallback |
| 10,000+ entries | Full hybrid: markdown hot index + vector DB + knowledge graph |
10. Integration with Agent Brain Architecture
┌──────────────────────────────────────────────────────────┐ │ Agent Brain Architecture │ │ │ │ SOUL.md — Personality (immutable core) │ │ AGENTS.md — Prefrontal Cortex (procedures) │ │ HIPPOCAMPUS.md — Hippocampus (memory index) ← YOU ARE HERE │ MEMORY.md — Neocortex (long-term knowledge) │ │ DEFRAG.md — Sleep Protocol (consolidation) │ │ memory/*.md — Hippocampal Buffer (daily encoding) │ │ memory/archive/ — Deep Cortical Storage │ │ TOOLS.md — Cerebellum (procedural skills) │ │ HEARTBEAT.md — Autonomic System (background tasks) │ │ │ │ Protocols: │ │ defrag.md — How to consolidate (sleep) │ │ synapse.md — How to share memory (between agents) │ │ hippocampus.md — How to index memory (retrieval) │ │ neocortex.md — How to store memory (long-term format) │ └──────────────────────────────────────────────────────────┘
10.1 Data Flow
New Experience
│
├──→ memory/YYYY-MM-DD.md (fast encoding — hippocampal buffer)
├──→ HIPPOCAMPUS.md (index entry created — sparse pointer)
└──→ (priority tagged if important — amygdala marking)
During Session:
Query → HIPPOCAMPUS.md → pointer → target file → answer
└──→ index updated
During Sleep (defrag.md):
memory/*.md → consolidated → MEMORY.md (content transfer)
HIPPOCAMPUS.md → reindexed (pointer update)
Weak entries → Decay Queue → pruned (forgetting)
Between Agents (synapse.md):
Agent A's HIPPOCAMPUS.md → shared index entries → Agent B
Pointers translated to shared memory locations| Protocol | Relationship to hippocampus.md |
|---|---|
| defrag.md | Triggers weekly/monthly maintenance. Updates index during consolidation. |
| synapse.md | Enables sharing index entries between agents. |
| neocortex.md | Defines the format of what the index points TO. |
11. Benchmarks
11.1 Production Data
Measured on Atlas, an AI agent running hippocampus.md in production since January 2026. Workspace: 87 memory files across daily logs, project notes, and configuration files.
| Method | Tokens/Query | Latency | Accuracy (n=50) | Monthly |
|---|---|---|---|---|
| Full file scan | 48,200 | 8.2s | 94% | $360 |
| Grep + top-5 | 7,800 | 1.1s | 71% | $60 |
| Vector search (3 chunks) | 2,400 | 0.9s | 82% | $19 + DB |
| HIPPOCAMPUS.md + targeted read ✦ | 3,500 | 1.3s | 89% | $27 |
| Hybrid (index + vector) ✦ | 4,100 | 1.5s | 93% | $31 |
Key observations: Index-only retrieval is 89% accurate at 13× lower cost. Hybrid reaches 93% at 12× lower cost. Grep fails on semantic queries. Vector search fails on exact queries.
11.2 Index Maintenance Costs
| Cycle | Frequency | Tokens | Monthly Cost (@$3/M tokens) |
|---|---|---|---|
| Light Sleep | Daily | ~2,000 | $0.18 |
| Deep Sleep | Weekly | ~10,000 | $0.12 |
| REM Processing | Monthly | ~30,000 | $0.09 |
| Total | ~$2/month |
11.3 First Live Implementation
HIPPOCAMPUS.md was created for Atlas on January 31, 2026. Implementation data:
- 48 index entries covering ~90 workspace files
- 10 sections: Workspace Core, Daily Logs, Operational State, and 7 project/domain sections
- Total index size: ~6.6KB
- DEFRAG.md updated to maintain HIPPOCAMPUS.md during nightly consolidation
| Type | Count | Description |
|---|---|---|
| config | 10 | Workspace core files (MEMORY.md, AGENTS.md, etc.) |
| daily | 8 | Daily log files (hippocampal buffer) |
| state | 4 | Operational state files (JSON) |
| project | 9 | Project documentation |
| doc | 6 | Whitepapers, API docs |
| research | 4 | Deep research files |
| skill | 2 | Skill definitions |
| agent | 1 | Sub-agent workspace |
| temp | 1 | Temporary migration guide |
12. What We Don't Yet Know
Open Questions
Index Quality Over Time
Does the index improve monotonically, or does it accumulate drift? If entry summaries become stale, retrieval accuracy could degrade. We need longer-term production data.
Optimal Entry Granularity
Should each index entry point to a file, a section, or a line? Section-level (§) is our current hypothesis for the sweet spot, but it's unvalidated.
Decay Parameters
Our default power-law parameters are borrowed from human psychology literature. AI agents have fundamentally different access patterns — the optimal parameters may differ significantly.
Pattern Separation Effectiveness
How similar is 'too similar'? When should two entries about related topics be merged vs. kept separate? The dentate gyrus uses 5% sparse activation — but we don't have an equivalent threshold.
Cold Start
A brand-new agent has no index. After ~20 queries that trigger fallback search, the index should cover the most common retrieval patterns. But this needs measurement.
Known Limitations
- Requires maintenance discipline. Without regular defrag cycles, the index becomes stale.
- Single-agent design. Multi-agent indexing via synapse.md is specified but not yet tested.
- No automatic summarization. Entry summaries depend on the agent or defrag quality.
- Markdown-only. The protocol doesn't natively handle non-text memory.
- Context window dependency. The index must fit in context. On smaller models (8K–32K), it competes with other needs.
13. Specification
file:
name: "HIPPOCAMPUS.md"
format: "markdown"
encoding: "UTF-8"
max_recommended_tokens: 15000
header:
format: "HTML comment on line 1"
fields:
version: "hippocampus.md vX.Y"
entries: integer
reindexed: ISO-8601 datetime
entry:
heading: "## {topic}"
summary: "One-line description"
pointers: "→ {file_path} [§{section}] [| {additional_paths}]"
metadata: "<!-- hx: {key=value pairs, pipe-separated} -->"
metadata_fields:
id: { type: string, required: true }
created: { type: date, required: true }
accessed: { type: date, required: true }
hits: { type: integer, required: true }
str: { type: float, range: [0.0, 1.0], required: true }
tags: { type: "string[]", separator: ",", required: false }
rel: { type: "string[]", separator: ",", required: false }
pri: { type: enum, values: [amygdala, normal, low], default: normal }
src: { type: enum, values: [defrag, manual, retrieval, auto] }
ver: { type: integer, default: 1 }
sections:
required: [Quick Access, By Topic, Decay Queue, Meta]
optional: [By Time, Associations]
decay:
function: "power_law"
formula: "str = initial × (1 + decay_rate × hours) ^ (-forgetting_rate)"
defaults: { initial: 1.0, decay_rate: 0.1, forgetting_rate: 0.3 }
modifiers:
amygdala_priority: "no decay"
manual_source: "0.5× forgetting_rate"
high_association: "0.7× forgetting_rate (3+ rel links)"
retrieval_boost: "reset accessed, strength += 0.1 (cap 1.0)"
maintenance:
daily: [recalc str, add new entries, update accessed/hits, move str<0.1 to queue]
weekly: [verify pointers, prune queue str<0.05, rebuild Quick Access, merge dupes]
monthly: [archive long-decay, eval structure, health report, update associations]
retrieval:
default_strategy: "hybrid"
strength_threshold: 0.3
fallback: "memory_search or grep"
on_miss: "create new entry from search results"
on_hit: "update accessed, increment hits, recalculate str"14. References
Neuroscience
- Teyler, T.J. & DiScenna, P. (1986). “The hippocampal memory indexing theory.” Behavioral Neuroscience, 100(2), 147–154.
- Teyler, T.J. & Rudy, J.W. (2007). “The hippocampal indexing theory and episodic memory: Updating the index.” Hippocampus, 17(12), 1158–1169.
- McClelland, J.L., McNaughton, B.L., & O'Reilly, R.C. (1995). “Why there are complementary learning systems in the hippocampus and neocortex.” Psychological Review, 102(3), 419–457.
- Yassa, M.A. & Stark, C.E.L. (2011). “Pattern separation in the hippocampus.” Trends in Neurosciences, 34(10), 515–525.
- Rolls, E.T. (2013). “The mechanisms for pattern completion and pattern separation in the hippocampus.” Frontiers in Systems Neuroscience, 7:74.
- Liu, X. et al. (2012). “Optogenetic stimulation of a hippocampal engram activates fear memory recall.” Nature, 484, 381–385.
- Tonegawa, S. et al. (2015). “Memory engram cells have come of age.” Neuron, 87(5), 918–931.
- Diekelmann, S. & Born, J. (2010). “The memory function of sleep.” Nature Reviews Neuroscience, 11, 114–126.
- Girardeau, G. et al. (2009). “Selective suppression of hippocampal ripples impairs spatial memory.” Nature Neuroscience, 12, 1222–1223.
- Wixted, J.T. (2004). “On Common Ground: Jost's (1897) law of forgetting and Ribot's (1881) law of retrograde amnesia.” Psychological Review, 111(4), 864–879.
- Ebbinghaus, H. (1885). Über das Gedächtnis. Leipzig: Duncker & Humblot.
- O'Keefe, J. & Nadel, L. (1978). The Hippocampus as a Cognitive Map. Oxford University Press.
- Moser, E.I., Kropff, E., & Moser, M.-B. (2008). “Place cells, grid cells, and the brain's spatial representation system.” Annual Review of Neuroscience, 31, 69–89.
- MacDonald, C.J. et al. (2011). “Hippocampal ‘time cells’ bridge the gap in memory for discontiguous events.” Neuron, 71(4), 737–749.
- Nader, K., Schafe, G.E., & Le Doux, J.E. (2000). “Fear memories require protein synthesis in the amygdala for reconsolidation after retrieval.” Nature, 406, 722–726.
AI Memory Systems
- Packer, C. et al. (2023). “MemGPT: Towards LLMs as Operating Systems.” arXiv:2310.08560.
- Mem0 (2024). “Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory.” arXiv:2504.19413.
- Kang, J. et al. (2025). “MemoryOS: A Memory Operating System for AI Agents.” arXiv:2506.06326. EMNLP 2025.
- MemOS Team (2025). “MemOS: An Operating System for LLM Agents.” arXiv:2507.03724.
- MAGMA (2025). “Multi-Agent Graph Memory Architecture for Long-Horizon Reasoning.” arXiv:2601.03236.
Related Protocols
- defrag.md — Memory Consolidation Protocol. defrag.md
- synapse.md — Multi-Agent Memory Sharing Protocol. synapse.md
- neocortex.md — Long-Term Memory Format. neocortex.md
Appendix A: Quick Reference Card
┌─────────────────────────────────────────────────────┐ │ hippocampus.md Quick Reference │ ├─────────────────────────────────────────────────────┤ │ │ │ WHAT: A sparse index of where memories live │ │ WHY: 13× cheaper retrieval than full scan │ │ HOW: Read index → follow pointer → read target │ │ │ │ Entry format: │ │ ## Topic │ │ Summary line. │ │ → file.md §section │ │ <!-- hx: id=x | str=0.9 | hits=12 | ... --> │ │ │ │ Decay: str = 1.0 × (1 + 0.1 × hours)^(-0.3) │ │ Threshold: str > 0.3 = retrieve; < 0.1 = prune │ │ │ │ Maintenance: │ │ Daily — recalculate strengths, add new entries │ │ Weekly — verify pointers, prune, rebuild links │ │ Monthly — archive, restructure, health report │ │ │ │ The index is not the memory. │ │ The index is what makes memory retrievable. │ └─────────────────────────────────────────────────────┘
Appendix B: Implementation Notes
Adding hippocampus.md to an Existing Agent
- Create HIPPOCAMPUS.md in the workspace root
- Bootstrap: Run a one-time scan of all memory files to create initial entries
- Add to session startup: Agent reads HIPPOCAMPUS.md after AGENTS.md and before MEMORY.md
- Integrate with retrieval: Before
memory_searchorgrep, check the index - Add maintenance to defrag: Include index update steps in your consolidation protocol
- Track access: When the index guides retrieval, update the entry metadata
Minimal Viable Implementation
# HIPPOCAMPUS.md <!-- Minimal index — updated manually --> ## Where to Find Things - Deploy commands → TOOLS.md - Project status → MEMORY.md §Projects - API keys → SECRETS.md - Recent work → memory/2026-01-31.md - VPS config → TOOLS.md §Acme VPS
Even this bare-minimum index saves significant retrieval tokens. Start here, grow into the full protocol as the workspace scales.
Version 1.0 • January 2026hippocampus.md is open source. Contributions welcome.Creative Commons Attribution 4.0 International
The index is not the memory. The index is what makes memory retrievable.