How Memory Management Impacts LLM Agents: An Empirical Study of Experience-Following Behavior
Zidi Xiong, Yuping Lin, Wenya Xie, Pengfei He, Zirui Liu, Jiliang Tang, Himabindu Lakkaraju, Zhen Xiang
Abstract
Memory is a critical component in large language model (LLM)-based agents, enabling them to store and retrieve past executions to improve task performance over time. In this paper, we conduct an empirical study on how memory management choices impact the LLM agents' behavior, especially their long-term performance. Specifically, we focus on two fundamental memory management operations that are widely used by many agent frameworks-memory addition and deletion-to systematically study their impact on the agent behavior. Through our quantitative analysis, we find that LLM agents display an experiencefollowing property: high similarity between a task input and the input in a retrieved memory record often results in highly similar agent outputs. Our analysis further reveals two significant challenges associated with this property: error propagation, where inaccuracies in past experiences compound and degrade future performance, and misaligned experience replay, where some seemingly correct executions can provide limited or even misleading value as experiences. Through controlled experiments, we demonstrate the importance of regulating experience quality within the memory bank and show that future task evaluations can serve as free quality labels for stored memory. Our findings offer insights into the behavioral dynamics of LLM agent memory systems and provide practical guidance for designing memory components that support robust, long-term agent performance. We also release our code to facilitate further study. 1
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
10 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- FragFuse: Bypassing Access Control of Large Language Model Agents via Memory-Based Query Fragmentation and Fusion cites MemoryBank: Enhancing Large Language Models with Long-Term Memory
- FragFuse: Bypassing Access Control of Large Language Model Agents via Memory-Based Query Fragmentation and Fusion cites Reflexion: language agents with verbal reinforcement learning
- Reflexion: language agents with verbal reinforcement learning cites Generative Agents: Interactive Simulacra of Human Behavior
- ExpeL: LLM Agents Are Experiential Learners cites Generative Agents: Interactive Simulacra of Human Behavior
- ExpeL: LLM Agents Are Experiential Learners cites Reflexion: language agents with verbal reinforcement learning
- Uncertainty Quantification in LLM Agents: Foundations, Emerging Challenges, and Opportunities cites Reflexion: language agents with verbal reinforcement learning
- Uncertainty Quantification in LLM Agents: Foundations, Emerging Challenges, and Opportunities cites A-Mem: Agentic Memory for LLM Agents
- MemGen: Weaving Generative Latent Memory for Self-Evolving Agents cites MemoryBank: Enhancing Large Language Models with Long-Term Memory
- MemGen: Weaving Generative Latent Memory for Self-Evolving Agents cites ExpeL: LLM Agents Are Experiential Learners
- MemGen: Weaving Generative Latent Memory for Self-Evolving Agents cites A-Mem: Agentic Memory for LLM Agents
- A-Mem: Agentic Memory for LLM Agents cites MemoryBank: Enhancing Large Language Models with Long-Term Memory
- Structurally Aligned Subtask-Level Memory for Software Engineering Agents cites Generative Agents: Interactive Simulacra of Human Behavior
- Structurally Aligned Subtask-Level Memory for Software Engineering Agents cites Reflexion: language agents with verbal reinforcement learning
Cited by top-tier papers10
- MemGen: Weaving Generative Latent Memory for Self-Evolving AgentsGuibin Zhang, Muxin Fu, Shuicheng YanICLR 2026 · 102 citations
- Stop Wasting Your Tokens: Towards Efficient Runtime Multi-Agent SystemsFulin Lin, Shaowen Chen, Ruishan Fang, Hongwei Wang et al.ICLR 2026 · 15 citations
- Structurally Aligned Subtask-Level Memory for Software Engineering AgentsKangning Shen, Jingyuan Zhang, Chenxi Sun, Wencong Zeng et al.ICML 2026 · 9 citations
- Uncertainty Quantification in LLM Agents: Foundations, Emerging Challenges, and OpportunitiesChangdae Oh, Seongheon Park, To Eun Kim, Jiatong Li et al.ACL 2026 · 8 citations
- FragFuse: Bypassing Access Control of Large Language Model Agents via Memory-Based Query Fragmentation and FusionZixin Rao, Wentian Zhu, Chan Aristella Lu, Zhaorun Chen et al.USENIX Security 2026 · 5 citations
Builds on10
- Reflexion: language agents with verbal reinforcement learningNoah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan et al.NeurIPS 2023 · 5,828 citations
- Generative Agents: Interactive Simulacra of Human BehaviorJoon Sung Park, Joseph C. O'Brien, Carrie Jun Cai, Meredith Ringel Morris et al.UIST 2023 · 1,882 citations
- A-Mem: Agentic Memory for LLM AgentsWujiang Xu, Zujie Liang, Kai Mei, Hang Gao et al.NeurIPS 2025 · 1,138 citations
- ExpeL: LLM Agents Are Experiential LearnersAndrew Zhao, Daniel Huang, Quentin Xu, Matthieu Lin et al.AAAI 2024 · 484 citations
- MemoryBank: Enhancing Large Language Models with Long-Term MemoryWanjun Zhong, Lianghong Guo, Qiqi Gao, He Ye et al.AAAI 2024 · 394 citations
Related papers
- Agentic Memory: Learning Unified Long-Term and Short-Term Memory Management for Large Language Model AgentsYi Yu, Liuyi Yao, Yuexiang Xie, Qingquan Tan et al.ACL 2026 · 40 citations
- A-MemGuard: A Proactive Defense Framework For LLM-Based Agent MemoryQianshan Wei, Tengchao Yang, Yaochen Wang, Xinfeng Li et al.ICML 2026
- Demystify the Role of Memory in Machine Learning Engineering AgentsXinyu Zhao, Junpeng Wang, Yuzhong Chen, Menghai Pan et al.ACL Findings 2026
- From Storage to Experience: A Survey on the Evolution of LLM Agent Memory MechanismsJinghao Luo, Yuchen Tian, Chuxue Cao, Ziyang Luo et al.ACL Findings 2026 · 3 citations
- Evaluating Memory in LLM Agents via Incremental Multi-Turn InteractionsYuanzhe Hu, Yu Wang, Julian McAuleyICLR 2026 · 246 citations
