Agent Memory
Agent memory stores and retrieves information such as task progress, preferences, or verified facts. These records commonly live outside model weights.
Short-term and long-term
LangGraph documentation distinguishes thread-scoped short-term state from cross-session long-term storage. MemGPT studies moving information between limited context and external storage. Memory does not itself imply fine-tuning.
Engineering recommendations
Record content, source, user or project scope, write time, expiry, and status. Separate user-confirmed facts, retrieved material, and model assumptions. Check authorization and freshness before retrieval.
A preference for Chinese reports may be reusable; a temporary API token should not become long-term memory. Corrections should replace or invalidate earlier records. Let users inspect and delete retained information.
Failure cases
Wrong answers can be stored and later mistaken for evidence. Similarity retrieval can cross user boundaries. A successful write may never be retrieved. A summary can lose a constraint or cause an already completed operation to repeat.
Test cross-session recall, corrections, expiry, deletion, and isolation. Measure incorrect recall alongside successful recall, and trace every used record to its source.
See context engineering, vector databases, RAG, and observability.