What is Agent Memory?
Agent Memory is the governed storage and retrieval of information that an AI agent may use across steps or sessions, with explicit scope, provenance, validity, access controls, and deletion rules.
How It Works
Agent memory is not synonymous with a chat transcript or a vector database. A production design separates thread state used to resume one run, long-term reusable memory, canonical business data, and audit records. It stores only information that has a defined purpose and provenance, keeps temporal corrections instead of silently overwriting facts, and retrieves through authorization, scope, validity, and relevance filters. Semantic facts, episodic evidence, and procedural guidance require different write and review policies. Recalled text is still untrusted input: high-impact or mutable facts must be verified against their system of record, and deletion must propagate to indexes, summaries, caches, and replicas.
Key Characteristics
- Thread state for resuming a current conversation or workflow
- Long-term facts, preferences, episodes, and procedures with distinct policies
- Provenance, confidence, purpose, sensitivity, and temporal validity
- Versioned corrections and expiry instead of silent overwrite
- Authorization and scope filters before lexical or semantic retrieval
- Deletion, auditability, and evaluation across the memory lifecycle
Common Use Cases
- Personal assistants that retain confirmed, user-authorized preferences
- Support agents that resume an approved case without treating history as truth
- Research agents that preserve sourced findings and their time context
- Coding agents that retain repository-specific procedures with review
- Tutors that track learning progress with access and retention controls
Example
Loading code...Frequently Asked Questions
What is agent memory in AI?
Agent memory is information that a runtime permits an agent to retrieve across steps or sessions. It may preserve context, confirmed preferences, sourced facts, or prior task evidence, but useful memory also needs scope, provenance, validity, access control, correction, and deletion. A surviving chat log or embedding index alone is not a memory architecture.
What are the types of agent memory?
Common categories are thread state for one run; semantic memory for validated facts and preferences; episodic memory for prior tasks and outcomes; and procedural memory for reusable rules. Canonical business data and immutable audit logs are related stores but should not be treated as agent memory: they have different owners and truth guarantees.
How is agent memory implemented?
Implementations commonly use a transactional record store as the source of truth plus derived lexical, vector, time, or graph indexes. At write time, capture the subject, source evidence, assertion type, confidence, purpose, sensitivity, and validity period. At retrieval time, authenticate first, filter tenant and purpose scope, exclude expired or deleted records, then search and rerank within a token budget.
What is the difference between agent memory and RAG?
RAG usually retrieves external documents to ground a response, while agent memory retains information selected from prior interactions or runs. The boundary can overlap, but they should not be conflated: external knowledge needs source freshness and document governance, while memory needs a write policy, user scope, temporal updates, and deletion. Both retrieval paths can return untrusted content.
What are the challenges of agent memory?
Key challenges are deciding what may be written, avoiding sensitive or transient retention, resolving temporal conflicts, preventing cross-tenant leakage, resisting instruction injection in recalled text, and proving deletion. Evaluate extraction, retrieval, temporal reasoning, update handling, abstention, privacy controls, latency, and deletion separately rather than measuring only whether a final answer sounds personalized.