AI CompendiumA public chart of the language
Home / Retrieval & Memory / Memory System
Retrieval & Memory

Memory System

Storage that gives an assistant continuity across sessions.

Definition

An application-level layer that stores facts, preferences or past interactions about a user or project and retrieves them into context later. It is retrieval pointed at the agent’s own history.

Because models are stateless, all "memory" is your storage plus a retrieval policy. The hard parts are deciding what is worth remembering, who may see it, and how to forget it.

The design decision that matters is what gets written and what gets read back, because uncontrolled memory degrades quietly. Storing everything produces a retrieval corpus of stale facts and superseded preferences; the useful systems store conclusions with dates and let old entries be superseded rather than accumulating.

How people use it
Designing an assistant that remembers preferences.
"Memory is a table with a user ID and a retrieve-on-write policy. Nothing about the model changes."
Worked examples

Preferences that aged badly

An assistant keeps using a tech stack the team migrated away from.

Write memories with a timestamp and a source, and prefer the most recent when they conflict. Memory without recency handling turns into a system that confidently applies last year’s decisions to this year’s work.

Memory as a file the model manages

Giving an agent continuity across sessions without a database.

Expose a small toolset over memory files — create, read, update, delete — and let the agent maintain them. Storage stays under your control, the contents are inspectable, and the implementation is small enough to reason about.

Sources
Related terms