Last updated: 2026-05-11
Short-Term vs Long-Term Memory for AI Agents
Short-term memory keeps the current run coherent; long-term memory changes future runs.
Definition
Short-term memory is usually conversation state or working context. Long-term memory is persisted knowledge that survives beyond the current task.
Why it matters
Mixing the two creates privacy, quality, and debugging problems. A failed plan should not become a permanent user fact.
Problems it solves
- Clear retention policy
- Better context budgets
- Safer personalization
Common misconceptions
- Everything in the transcript should not become long-term memory.
- Summaries are not automatically safe long-term facts.
- Long-term memory should be testable and reversible.
Minimal example
Keep current task state in the run object; persist only user-approved preferences or facts with source timestamps.
Next step: Define retention classes before choosing a memory vendor.