Working
Finish the current task
Keep plans, tool results, unresolved decisions, and resume state needed now.
- Start with
- Bounded context and typed checkpoints.
- Do not persist
- Every intermediate thought or raw tool response.
Agent memory decision guide
Memory is a write–manage–read system, not a vector-store checkbox. Start with what the agent must remember, choose the least complex matching pattern, then prove recall improves the task.
Purpose before storage
Do not choose a database yet. Write one sentence describing the information that must survive and the decision it should improve.
Working
Keep plans, tool results, unresolved decisions, and resume state needed now.
Factual
Preserve user preferences, entity facts, decisions, and changing world state.
Episodic
Preserve events, actions, outcomes, feedback, and the order in which they occurred.
Procedural
Preserve tested workflows, skills, tool sequences, and recovery procedures.
Complexity must earn its place
Start at the top. Move down only when the workload requires the additional structure. Patterns can compose, but each one needs its own write and failure policy.
| Pattern | Choose when | Bad fit | Minimum controls | Evidence and catalog |
|---|---|---|---|---|
| Bounded context + checkpoints | A task needs current state, compaction, or deterministic resume. | Facts must survive many sessions or be shared across users. | Token budget, typed checkpoint, expiry, and resume test. |
MemGPT Browse working memory |
| Retrieval store | Many independent text or fact records must be recalled by meaning or exact term. | Relationships, contradictions, or changing truth dominate the workload. | Write filter, tenant key, provenance, hybrid retrieval, and abstention. |
LongMemEval Browse retrieval |
| Temporal fact graph | Facts change, entities relate, or answers require multi-hop and time-aware reasoning. | Recall is small, flat, and rarely updated. | Event and validity time, conflict rules, source links, and deletion traversal. |
Zep / Graphiti paper Browse temporal graphs |
| Episodic → semantic layers | Repeated interactions must become stable facts without losing event history. | The system cannot explain or reverse consolidation. | Immutable episodes, promotion rule, source links, correction, and rollback. |
Generative Agents Browse layered memory |
| Procedural library | Successful actions or workflows repeat across comparable tasks. | Tools change quickly or success came from one unreviewed run. | Version, applicability scope, executable test, approval, and rollback. |
Agent Workflow Memory Browse procedural memory |
Architecture is a hypothesis
A relevant retrieval is not a successful agent outcome. Evaluate the full path from write to answer or action, including queries that should not use memory.
Baselines
Task abilities
System cost
No-harm checks
Start with the five abilities defined by LongMemEval, then add workload-specific tasks. Use LoCoMo for long-conversation reasoning coverage. Neither benchmark replaces production traces or deletion tests.
Keep the guide falsifiable
Submit a primary source, name the workload it changes, and state the failure mode. A new pattern belongs here only if it changes a concrete architecture decision.
These papers motivate the patterns and evaluation questions. They do not endorse this guide or prove that one implementation is best.