Memory as a Shared Notebook
Memory as a Shared Notebook
This is where most people go wrong with agents.
They treat memory as a database. It's not.
Memory is a compressed understanding of the world.
The Problem With Databases
If you tried to store every conversation in a database:
- Retrieval becomes expensive
- Context windows overflow
- Relevance is hard to determine
- Old information drowns new information
The Solution: Hierarchical Memory
Think of how your brain works:
- You don't remember every word of every conversation
- You remember the gist — the important parts
- Details fade unless reinforced
- Some things are always accessible (your name, important facts)
OpenClaw memory works the same way:
Layer 1: Working Memory (Always Loaded)
memory/WORKING.md
- Current task
- Active blockers
- Next stepsThis is what's on your desk right now.
Layer 2: Index (Always Loaded)
MEMORY.md
- Who is who (1-liner per person)
- Key projects (pointers to detail files)
- Critical rules and commitments
- File paths to everything elseThis is your table of contents. It knows where things are, not what they all contain.
Layer 3: Deep Memory (Loaded On-Demand)
memory/people/tom.md — Details about Tom
memory/projects/hq.md — HQ project details
memory/knowledge/*.md — Lessons, playbooks
memory/daily/*.md — What happened each dayThese are your filing cabinets. You pull them when needed.
Layer 4: Semantic Search (Fallback)
memory_search("polymarket strategy")
→ Returns relevant snippets with file pathsWhen you're not sure where something is, search for it.
The Core Principle
Know WHERE, not WHAT
Your index (MEMORY.md) stores pointers, not content.
❌ Bad:
## Tom
Tom is my human. He founded TK100X GmbH in 2024. He was
previously co-founder of App Radar which was acquired by
SplitMetrics in 2023. He lives in Graz, Austria. His goal
is €50K MRR by December 2026. He prefers Cloudflare over
Vercel. He uses meditation apps. He was a national paper
airplane champion...✅ Good:
## People
- **Tom** — my human, founder TK100X, lives in Graz
→ Details: memory/people/tom.mdThe index stays under 3KB. Details live in dedicated files.
When Memory Gets Written
| Event | Action |
|---|---|
| Important decision | Log to daily + update relevant file |
| New person mentioned | Create people file + add to index |
| Correction from user | Update fact + log the learning |
| Project milestone | Update project file |
| Session ending | Flush working memory to daily log |
When Memory Gets Read
| Trigger | What Gets Loaded |
|---|---|
| Session start | MEMORY.md + WORKING.md + today's daily |
| Person discussed | Their people file |
| Project work | That project file |
| Uncertain | Semantic search |
The Forgetting Feature
This sounds counterintuitive, but forgetting is essential.
Without compression:
- Context fills up
- Old noise drowns new signal
- Performance degrades
- Costs explode
With compression:
- Daily logs get summarized
- Old details fade
- Important facts persist
- System stays fast
The key is being intentional about what persists.
Persist:
- Decisions and their reasoning
- User preferences and corrections
- Project milestones
- Lessons learned
Let fade:
- Casual conversation
- Temporary debugging
- Already-acted-upon information
This is Module 4 in detail. For now, just understand: memory is a compressed, hierarchical system — not a database dump.