Research note: Model specifications and benchmark results are time-bound. Check the dated primary sources below before using them for a technical or purchasing decision.

Traditional Retrieval-Augmented Generation (RAG) fails for autonomous agents because flat vector similarity has no concept of time, authority, or invalidation. If a user states "I switched our database from MySQL to PostgreSQL last Tuesday," a standard vector search often retrieves old MySQL snippets because the keyword overlap is higher.

To fix this, modern agent systems implement a 4-Scope Hierarchical Memory Model:

Memory ScopeLifecycleStorage TargetInvalidation Trigger
1. User ScopePersistent cross-sessionEntity Knowledge GraphExplicit user correction / preference edit
2. Agent ScopeModel lifetimeLearned Heuristic RegistryPost-mortem failure analysis
3. Session ScopeSingle task trajectoryWorking Memory BufferTask completion / PR merged
4. Org ScopeEnterprise repositoryAST & Rule BaseRepository commit / schema migration

Sources & Research Papers

  • Generative Agents Memory Architecture: Park, J. S., et al. (2023). Generative Agents: Interactive Simulacra of Human Behavior. UIST 2023. arXiv:2304.03442.
  • MemGPT Architecture: Packer, C., et al. (2023). MemGPT: Towards LLMs as Operating Systems. arXiv:2310.08560.