Memory System
Storage that gives an assistant continuity across sessions.
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.
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.
- docsMemory tool ↗
A client-side tool for creating, reading and updating persistent memory files, with storage staying under the application’s control.
- paperMemGPT: towards LLMs as operating systems ↗
Virtual context management: memory tiers with interrupts, so the model can page information in and out of its window. The clearest research statement of the memory-hierarchy idea.
- paperGenerative agents: interactive simulacra of human behavior ↗
An architecture of experience records, synthesised reflections and retrieved memories driving plans. The reference implementation for long-term agent memory.
- paperReflexion: language agents with verbal reinforcement learning ↗
Agents keep an episodic memory of verbal self-feedback and improve across trials without touching the weights — "learn from the last attempt" with no training run.
Stateless
The model remembers nothing between requests.
Session
One continuous run of work with the agent, with its own accumulated history.
RAG · Retrieval-Augmented Generation
Look things up, then put what you found in the prompt.
Embedding · Vector
A list of numbers representing meaning, so similar things land close together.
Data Governance
Rules about what data may be used, by whom, and retained how long.