Long-Term Memory
Also known as: Persistent Memory, External Memory
Definition
Memory that persists beyond a single conversation or session, enabling an agent or system to retain information across interactions over extended periods. Long-term memory requires external storage (databases, files) since LLMs have no native persistence. It enables agents to learn, remember user preferences, and build up knowledge over time.
What this is NOT
- Not the conversation history within a single session (that's short-term/working memory)
- Not the model's weights (those are static after training)
- Not caching (caching is for performance; memory is for learning)
Alternative Interpretations
Different communities use this term differently:
llm-practitioners
External storage systems that agents can read from and write to across sessions. Implementations include vector databases for semantic retrieval, key-value stores for facts, and structured databases for relational data.
Sources: MemGPT paper and documentation, Letta memory systems, LangChain memory documentation
cognitive-science
The cognitive system for storing information over long periods, including episodic memory (events), semantic memory (facts), and procedural memory (skills). Contrasted with working memory (short-term, limited capacity).
Sources: Atkinson-Shiffrin memory model, Cognitive psychology literature
Examples
- MemGPT storing facts about the user in archival storage
- A coding assistant remembering project context across sessions
- A personal AI that remembers your preferences and past conversations
- Vector database storing embeddings of past interactions
Counterexamples
Things that might seem like Long-Term Memory but are not:
- Conversation history within a single chat (that's short-term)
- System prompt (that's configuration, not learned memory)
- The model's parametric knowledge (static, not updated)
Relations
- overlapsWith agent-memory (Long-term memory is a component of agent memory systems)
- inTensionWith context-window (Long-term memory persists beyond context limits)
- overlapsWith knowledge-base (Knowledge bases can serve as long-term memory)
- overlapsWith retrieval-augmented-generation (Memory retrieval uses RAG patterns)
Implementations
Tools and frameworks that implement this concept:
- Letta (MemGPT) primary
- Zep primary