← Back to Labs
Interactive Lab

💭 Memory Lab

Experience the three-layer memory architecture. Create entries, search across layers, and run autoDream consolidation.

Three-Layer Memory ArchitectureLAYER 1MEMORY.md Index~150 chars per pointerAlways loaded into contextCHEAPLAYER 2Topic FilesFetched on demand, never all at onceWrite to topic first, then update indexMEDLAYER 3Session TranscriptsSearched selectively, never fully loadedHeaviest data — archive tierHEAVYMemory is a HINT, not truth — always verify against actual codebase

Layer 1: MEMORY.md Index

Always Loaded
# MEMORY.md
- [Project uses Next.js 14](tech_stack.md) — Next.js 14 App Router with TypeScript
- [V5.3 deployment standard](governance.md) — Docker Compose + PM2 + Cloudflare Tunnel
- [User prefers dark theme](user_prefs.md) — Dark theme with DM Sans / IBM Plex Sans / JetBrains Mono
3 entries · ~272 chars

Create Memory Entry

Search Memory (Layer 3 simulation)

autoDream Consolidation

Simulate the memory consolidation process — merging, deduplication, and fact conversion.

Key Design Principles

Memory is a HINT, not truth — always verify against actual state
Write to topic file first, then update the index
If a fact can be re-derived from code, don't store it
autoDream runs in isolation — read-only, no corruption risk
Index is cheap (~150 chars) — topic files are expensive
Session transcripts are heaviest — search only, never load