Back to Blog
Episodic Memory Cognitive OS · 14 min read

Episodic Memory: The System That Remembers Like a Person

Humans remember what matters, forget the trivial, and when we need a specific piece of information, sometimes we retrieve it and sometimes we don't. Agents should work the same way. Short, medium, and long-term memory with automatic summarization, relevance-based prioritization, and traceable forgetting.

Gonzalo Monzón

Gonzalo Monzón

July 7, 2026 · Series: Cognitive OS — The Complete System (3/3)

TL;DR

A typical LLM has a context window — but that's not memory, it's cache. When the session ends, the context is lost. Cadences Lab's episodic memory lives in PDB with a structure built on timestamp, summary, decisions, tags, and relevance. Complete lifecycle: recording → auto-summary (24h) → prioritization → traceable forgetting (30+ days) → retrieval by time range, tags, or text. Nothing is ever deleted without leaving a trace. Third and final article of the Cognitive OS series.

The problem

The context window is not memory

A typical LLM has a context window of 8K to 200K tokens. But that's not memory — it's cache. When the session ends, the context is lost.

You can use RAG to retrieve information, but RAG doesn't understand time, relevance, or urgency. It returns fragments without order or priority.

Without it, an autonomous agent is an intern who starts from scratch every morning.

The solution

Structured episodic memory

At Cadences Lab, episodic memory lives in PDB, with a structure that mimics how humans remember:

^MEM("2026-07-01", "conv_123", "summary") = "User asked about..."
^MEM("2026-07-01", "conv_123", "decisions") = {"confidence": 8.5}
^MEM("2026-07-01", "conv_123", "tags") = ["client", "urgent"]
        

Each interaction is stored with:

⏰ Timestamp

When it happened — enables time-range searches

📝 Summary

What happened — auto-generated by Tom

🎯 Decisions

What was decided — JSON structure with confidence and action

🏷️ Tags

Categories for fast retrieval and filtering

📊 Relevance (0-10)

Updated with each access — weighted average of access frequency (40%), tags (30%), age (20%), and agent feedback (10%)

The lifecycle of a memory

Record → after 24h → Summary → if relevance < 3.0 + 30 days → Archive

Each archive generates an audit record. Nothing is ever deleted without leaving a trace.

1

Record

Every interaction is saved with all its metadata in real time

2

Auto-summary

If there are +5 events in 24h, Tom summarizes them into 3 lines. Without a threshold, it would be noise

3

Prioritization

Records with high relevance (frequent access, important tags) are retained

4

Traceable forgetting

If relevance < 3.0 and +30 days → archived. An audit record remains: when, why, and what it contained

Retrieval: it's not RAG

When Zalo needs to remember something, it doesn't perform a similarity search on vectors. It makes a structured query over meaningful data:

1. "What happened with Project X last week?"
2. → Search in ^MEM with range "2026-06-24 to 2026-07-01" and tag "project-x"
3. → Retrieves summaries of the 5 most relevant conversations
4. → Injects them into the LLM's context as "recent memories"

Timestamp matters. Tags matter. Relevance matters. It's not a vector soup — it's structured memory. And it's 3× faster than RAG because it doesn't need to compute embedding similarity — it's a direct PDB query by time index + tags.

What about very old memories?

When a record exceeds 30 days without being accessed, it's compressed into an even shorter summary and moved to cold storage. The LLM doesn't see it unless explicitly requested. But it's never fully deleted. Because sometimes a client returns after months and asks "what did we agree on?" — and Zalo can answer based on facts, not hallucination.

Series: Cognitive OS — The Complete System (3/3)

📚 Series complete

Go back to the blog

All articles in the series:

1. Cognitive OS 2. Trust System 3. Episodic Memory (this)

The circle closes

4 series, 14 articles, one Cognitive OS. From the binary protocol to episodic memory. This is the finale — the complete vision.

Start at the beginning: What is LUMEN?

Cognitive OS — Complete Series. Cadences Lab © 2026. LUMEN is MIT.

Newsletter

No te pierdas ninguna historia

Suscríbete para recibir nuevos lanzamientos, capítulos exclusivos y contenido detrás de cámaras.

  • Insights y artículos semanales
  • Contenido exclusivo y acceso anticipado
  • Sin spam, cancela cuando quieras

Respetamos tu privacidad. Puedes darte de baja cuando quieras.