Memory in AI Systems
Seven issues on how AI agents store, score, manage, and retrieve memories across sessions. Grounded in the open-source Recall memory layer.
By the end of this series you'll be able to...
- Understand why memory is not a feature but a belief state — and why agents without memory degrade silently rather than fail loudly. Issue 1
- Design an extraction pipeline that filters signal from noise at write time — scoring importance and confidence so your memory store improves with use. Issue 2
- Implement contradiction detection that automatically supersedes outdated facts when a user corrects their preferences or context changes. Issue 3
- Build hybrid retrieval that combines BM25 keyword search with dense vector similarity, fused with a 4-component scoring model balancing relevance, recency, importance, and access frequency. Issue 4
- Apply memory decay scoring so stale memories fade without being deleted — keeping your belief state fresh without manual pruning. Issue 5
- Evaluate memory system quality against the LOCOMO benchmark — distinguishing between retrieval precision and downstream task accuracy. Issue 6
- Choose the right memory architecture for your production system — SQLite vs. Postgres+pgvector, local vs. managed, single-user vs. multi-tenant. Issue 7
Memory Is Belief State, Not Storage
Most agents treat memory as a storage problem. It is a state management problem — and the distinction produces completely different architectures.
The WRITE Phase — What to Remember and How
Not every turn deserves a memory. How you design the extraction step and score importance and confidence at write time determines whether your memory store improves or degrades.
The MANAGE Phase — The Work Nobody Does
Memory without curation rots. How contradiction detection, decay scoring, and consolidation keep your agent's belief state accurate over time.
The READ Phase — Retrieval as a Hyperparameter
Retrieval thresholds, ranking functions, and injection rates are tunable. Most teams set them once and forget them. Here's what to tune and how.
Four Design Patterns in Order
Most teams jump to Pattern 3 (vector store) or Pattern 4 (episodic log). Most should start with Pattern 2. A decision matrix for which memory architecture your use case actually requires.
Memory Failures — Named and Fixable
Six memory failure modes with detection queries and mitigations. Plus GDPR erasure: the single SQL call that satisfies Article 17.
Building a Memory System End-to-End
Schema to governance — the complete implementation. Every component from the series assembled, every decision justified, and the migration path from SQLite to Postgres+pgvector.