CONCEPT

Long-Term Memory

Authoritative Definition

Externalized, persistent storage that allows AI agents to recall facts, user preferences, and historical context across separate execution sessions and vast timeframes.

Overview & Technical Description

Long-Term Memory architectures externalize an agent's state into scalable storage systems, such as vector databases, graph databases, or specialized key-value context stores. This enables the agent to retain knowledge continuously, bridging the gap between disparate conversational sessions and overcoming the finite limitations of an LLM's working context window. When an agent requires historical context, it queries this long-term storage to retrieve the most relevant snippets, injecting them dynamically into its prompt as working memory. This retrieval is often driven by semantic search, recency scoring, or explicit relational queries, ensuring that only the most pertinent information is loaded at any given time. Robust long-term memory systems must handle continuous data ingestion, deduplication, and conflict resolution. They often integrate sophisticated sub-systems for memory consolidation and memory decay, allowing agents to maintain a coherent, up-to-date understanding of users and environments over extended lifecycles.

Editorial Notes

Analogous to persistent disk storage in traditional computing. Effectively balancing retrieval latency, context relevance, and prompt size is the primary engineering challenge when implementing long-term memory for production agents.

Related Concepts

Companies Implementing Long-Term Memory

3 listed

Products & Tools