How Memory Management Impacts LLM Agents: An Empirical Study of Experience-Following Behavior
Paper · 2026 · Zidi Xiong, Yuping Lin, Wenya Xie et al.
Summary
LLM agents often keep an episodic memory of earlier task queries and their execution trajectories, then retrieve similar records as in-context demonstrations. This study asks how two basic memory operations, adding and deleting records, shape agent behavior over long runs. The authors test four agents: a synthetic regression agent (RegAgent), EHRAgent, AgentDriver, and a CIC-IoT Agent, all mostly using GPT-4o-mini. They compare addition policies that rely on evaluators of differing reliability, along with several deletion schemes. The central finding is an "experience-following" effect: when the current query closely resembles a retrieved one, the agent's output tends to closely resemble the stored output. This creates two risks. Errors in stored records can spread and grow (error propagation), and some apparently correct records still work poorly as demonstrations (misaligned experience replay). Reliable evaluators, and treating later task outcomes as free quality labels, mitigate both. The work offers practical, cross-agent guidance for building memory modules that hold up over time.
Key points
- Four agents with different input/output formats and retrieval mechanisms are studied. RegAgent is a controllable synthetic task that approximates a linear mapping, which lets the authors set the noise level in memory directly.
- Addition is compared across four settings: a fixed-memory baseline, add-all, selective addition with a coarse automatic evaluator, and selective addition with a strict human-like evaluator. Deletion variants are history-based (utility from future outcomes), periodic, and combined.
- History-based deletion removes records with higher intrinsic error. In RegAgent, deleted demonstrations have visibly larger errors than retained ones, even when strict addition admitted only entries with error ≤ 1.
- Under task distribution shift on EHRAgent and AgentDriver, performance stays close to the no-shift setting. Periodic deletion helps stabilize results.
- With capacity capped at 100 records (EHRAgent) and 180 records (AgentDriver), managed memory outperforms the fixed-memory baseline. Performance converges as memory grows, which suggests unbounded memory growth is unnecessary. Code and data are released at github.com/yuplin2333/agent_memory_manage.
Institutions
Fields, topics and concepts
📚 Shelves 4The field of science this work belongs to (OpenAlex fields).Computer Science · 16,667 worksArtificial Intelligence · 16,194 worksArts and Humanities · 16,039 worksLanguage and Linguistics · 15,891 works
Cite
Cite as Zidi Xiong, Yuping Lin, Wenya Xie, Pengfei He, Zirui Liu, Jiliang Tang, Himabindu Lakkaraju and Zhen Xiang. 2026. How Memory Management Impacts LLM Agents: An Empirical Study of Experience-Following Behavior. Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers).
@inproceedings{xiong2026how,
title = {{How Memory Management Impacts LLM Agents: An Empirical Study of Experience-Following Behavior}},
author = {Zidi Xiong, Yuping Lin, Wenya Xie, Pengfei He, Zirui Liu, Jiliang Tang, Himabindu Lakkaraju and Zhen Xiang},
booktitle = {Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},
year = {2026},
doi = {10.18653/v1/2026.acl-long.27},
url = {https://doi.org/10.18653/v1/2026.acl-long.27}
}References
- Petr Anokhin, Nikita Semenov, Artyom Sorokin, Dmitry Evseev, Mikhail Burtsev, and Evgeny Burnaev. 2024. Arigraph: Learning knowledge graph world models with episodic memory for llm agents. arXiv preprint arXiv:2407.04363. — [arXiv:2407.04363](https://arxiv.org/abs/2407.04363) find
- H Beaunieux, V Hubert, T Witkowski, AL Pitel, S Rossi, JM Danion, B Desgranges, and F Eustache. 2006. Which processes are involved in cognitive procedural learning? Memory. 2006 Jul;14(5):521-39. doi: 10.1080/09658210500477766. PMID: 16754239. — [doi:10.1080/09658210500477766](https://doi.org/10.1080/09658210500477766) find
- Holger Caesar, Varun Bankiti, Alex H Lang, Sourabh Vora, Venice Erin Liong, Qiang Xu, Anush Krishnan, Yu Pan, Giancarlo Baldan, and Oscar Beijbom. 2020. nuscenes: A multimodal dataset for autonomous driving. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages… find
- Yuki Hou, Haruki Tamoto, and Homei Miyashita. 2024. " my agent understands me better": Integrating dynamic human-like memory recall and consolidation in llm-based agents. In Extended Abstracts of the CHI Conference on Human Factors in Computing Systems, pages 1–7. find
- Mengkang Hu, Tianxing Chen, Qiguang Chen, Yao Mu, Wenqi Shao, and Ping Luo. 2024. Hiagent: Hierarchical working memory management for solving long-horizon agent tasks with large language model. arXiv preprint arXiv:2408.09559.
- Alistair E. W. Johnson, Tom J. Pollard, Lu Shen, Li-Wei H. Lehman, Mengling Feng, Mohammad Ghassemi, Benjamin Moody, Peter Szolovits, Leo Anthony Celi, and Roger G. Mark. 2016. MIMIC-III, a freely accessible critical care database. Scientific Data, 3:160035.
- Abhilasha Ashok Kumar. 2020. Semantic memory: A review of methods, models, and current challenges. Psychonomic Bulletin & Review, 28:40 – 80. find
- Aditya Kusupati, Gantavya Bhatt, Aniket Rege, Matthew Wallingford, Aditya Sinha, Vivek Ramanujan, William Howard-Snyder, Kaifeng Chen, Sham Kakade, Prateek Jain, and 1 others. 2022. Matryoshka representation learning. Advances in Neural Information Processing Systems, 35:30233–30249. find
- Andrew Kyle Lampinen, Martin Engelcke, Yuxuan Li, Arslan Chaudhry, and James L. McClelland. 2025. Latent learning: episodic memory complements parametric learning by enabling flexible reuse of experiences. find
- Yang Li, Yangyang Yu, Haohang Li, Zhi Chen, and Khaldoun Khashanah. 2023. Tradinggpt: Multi-agent system with layered memory and distinct characters for enhanced financial trading performance. arXiv preprint arXiv:2309.03736. — [arXiv:2309.03736](https://arxiv.org/abs/2309.03736) find
- Xuechen Liang, Yangfan He, Yinghui Xia, Xinyuan Song, Jianhui Wang, Meiling Tao, Li Sun, Xinhang Yuan, Jiayi Su, Keqin Li, and 1 others. 2024. Self-evolving agents with reflective and memory-augmented abilities. arXiv preprint arXiv:2409.00872. — [arXiv:2409.00872](https://arxiv.org/abs/2409.00872) find
- Lei Liu, Xiaoyan Yang, Yue Shen, Binbin Hu, Zhiqiang Zhang, Jinjie Gu, and Guannan Zhang. 2023. Thinkin-memory: Recalling and post-thinking enable llms with long-term memory. arXiv preprint arXiv:2311.08719. — [arXiv:2311.08719](https://arxiv.org/abs/2311.08719) find
- Man Luo, Xin Xu, Yue Liu, Panupong Pasupat, and Mehran Kazemi. 2024. In-context learning with retrieved demonstrations for language models: A survey. arXiv preprint arXiv:2401.11624.
- Jiageng Mao, Junjie Ye, Yuxi Qian, Marco Pavone, and Yue Wang. 2024. A language agent for autonomous driving. In First Conference on Language Modeling. find
- Euclides Carlos Pinto Neto, Sajjad Dadkhah, Raphael Ferreira, Alireza Zohourian, Rongxing Lu, and Ali A. Ghorbani. 2023. Ciciot2023: A real-time dataset and benchmark for large-scale attacks in iot environment. Sensors, 23(13). of human behavior. In Proceedings of the 36th annual acm symposium on us… find
- Wenqi Shi, Ran Xu, Yuchen Zhuang, Yue Yu, Jieyu Zhang, Hang Wu, Yuanda Zhu, Joyce Ho, Carl Yang, and May D Wang. 2024. Ehragent: Code empowers large language models for complex tabular reasoning on electronic health records. arXiv preprint arXiv:2401.07128. — [arXiv:2401.07128](https://arxiv.org/abs/2401.07128) find
- Noah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan, and Shunyu Yao. 2024. Reflexion: Language agents with verbal reinforcement learning. Advances in Neural Information Processing Systems, 36.
- Theodore R Sumers, Shunyu Yao, Karthik Narasimhan, and Thomas L Griffiths. 2023. Cognitive architectures for language agents. arXiv preprint arXiv:2309.02427. find
- Guanzhi Wang, Yuqi Xie, Yunfan Jiang, Ajay Mandlekar, Chaowei Xiao, Yuke Zhu, Linxi Fan, and Anima Anandkumar. 2023. Voyager: An open-ended embodied agent with large language models. arXiv preprint arXiv:2305.16291. find
- Lei Wang, Chen Ma, Xueyang Feng, Zeyu Zhang, Hao Yang, Jingsen Zhang, Zhiyuan Chen, Jiakai Tang, Xu Chen, Yankai Lin, and 1 others. 2024a. A survey on large language model based autonomous agents. Frontiers of Computer Science, 18(6):186345.
- Zhiruo Wang, Daniel Fried, and Graham Neubig. 2024b. Trove: Inducing verifiable and efficient toolboxes for solving programmatic tasks. arXiv preprint arXiv:2401.12869. find
- Zora Zhiruo Wang, Jiayuan Mao, Daniel Fried, and Graham Neubig. 2025. Agent workflow memory. In Forty-second International Conference on Machine Learning.
- Andrew Nuxoll and John E. Laird. 2007. Extending cognitive architecture with episodic memory. In AAAI Conference on Artificial Intelligence. find
- Zhen Xiang, Linzhi Zheng, Yanjie Li, Junyuan Hong, Qinbin Li, Han Xie, Jiawei Zhang, Zidi Xiong, Chulin Xie, Carl Yang, and 1 others. 2024. Guarda-gent: Safeguard llm agents by a guard agent via knowledge-enabled reasoning. arXiv preprint arXiv:2406.09187. — [arXiv:2406.09187](https://arxiv.org/abs/2406.09187) find
- Jiayi Pan, Yichi Zhang, Nicholas Tomlin, Yifei Zhou, Sergey Levine, and Alane Suhr. 2024. Autonomous evaluation and refinement of digital agents. arXiv preprint arXiv:2404.06474. find
- Wujiang Xu, Kai Mei, Hang Gao, Juntao Tan, Zujie Liang, and Yongfeng Zhang. 2025. A-mem: Agentic memory for llm agents. arXiv preprint arXiv:2502.12110.
- Zhuoshi Pan, Qianhui Wu, Huiqiang Jiang, Xufang Luo, Hao Cheng, Dongsheng Li, Yuqing Yang, Chin-Yew Lin, H Vicky Zhao, Lili Qiu, and 1 others. 2025. On memory construction and retrieval for personalized conversational agents. arXiv preprint arXiv:2502.05589. — [arXiv:2502.05589](https://arxiv.org/abs/2502.05589) find
- Zhangyue Yin, Qiushi Sun, Qipeng Guo, Zhiyuan Zeng, Qinyuan Cheng, Xipeng Qiu, and Xuan-Jing Huang. 2024. Explicit memory learning with expectation maximization. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 16618–16635. find
- Joon Sung Park, Joseph O’Brien, Carrie Jun Cai, Meredith Ringel Morris, Percy Liang, and Michael S Bernstein. 2023. Generative agents: Interactive simulacra Ruihong Zeng, Jinyuan Fang, Siwei Liu, and Zaiqiao Meng. 2024. On the structural memory of llm agents. arXiv preprint arXiv:2412.15266. — [arXiv:2412.15266](https://arxiv.org/abs/2412.15266) find
- Zeyu Zhang, Xiaohe Bo, Chen Ma, Rui Li, Xu Chen, Quanyu Dai, Jieming Zhu, Zhenhua Dong, and Ji-Rong Wen. 2024. A survey on the memory mechanism of large language model based agents. arXiv preprint arXiv:2404.13501. find
- Andrew Zhao, Daniel Huang, Quentin Xu, Matthieu Lin, Yong-Jin Liu, and Gao Huang. 2024. Expel: Llm agents are experiential learners. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pages 19632–19642. find
- Longtao Zheng, Rundong Wang, Xinrun Wang, and Bo An. 2024. Synapse: Trajectory-as-exemplar prompting with memory for computer control. In The Twelfth International Conference on Learning Representations. find
- Wanjun Zhong, Lianghong Guo, Qiqi Gao, He Ye, and Yanlin Wang. 2024. Memorybank: Enhancing large language models with long-term memory. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pages 19724–19731. find
- Huichi Zhou, Yihang Chen, Siyuan Guo, Xue Yan, Kin Hei Lee, Zihan Wang, Ka Yiu Lee, Guchun Zhang, Kun Shao, Linyi Yang, and 1 others. 2025. Agentfly: Fine-tuning llm agents without fine-tuning llms. arXiv preprint arXiv:2508.16153. — [arXiv:2508.16153](https://arxiv.org/abs/2508.16153) find
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/xiong-2026-how-memory-management-impacts-llm/