Contextual Experience Replay for Self-Improvement of Language Agents
Yitao Liu, Chenglei Si, Karthik R. Narasimhan, Shunyu Yao
Abstract
Large language model (LLM) agents have been applied to sequential decision-making tasks such as web navigation, but without any environment-specific experiences, they often fail in these complex tasks. Moreover, current LLM agents are not designed to continually learn from past experiences during inference time, which could be crucial for them to gain these environment-specific experiences. To address this, we propose Contextual Experience Replay (CER), a training-free framework to enable efficient self-improvement for language agents in their context window. Specifically, CER accumulates and synthesizes past experiences into a dynamic memory buffer. These experiences encompass environment dynamics and common decision-making patterns, allowing the agents to retrieve and augment themselves with relevant knowledge in new tasks, enhancing their adaptability in complex environments. We evaluate CER on the challenging WebArena and VisualWebArena benchmarks. On VisualWebArena, CER achieves a competitive performance of 31.9%. On WebArena, CER also gets a competitive average success rate of 36.7%, relatively improving the success rate of the GPT-4o agent baseline by 51.0%. We also conduct a comprehensive analysis on it to prove its efficiency, validity and understand it better.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext f765ebc1-b64d-4235-bac8-3815e4f13b24Cited by top-tier papers5
- ReasoningBank: Scaling Agent Self-Evolving with Reasoning MemorySiru Ouyang, Jun Yan, I-Hung Hsu, Yanfei Chen et al.ICLR 2026 · 244 citations
- PolySkill: Learning Generalizable Skills Through Polymorphic Abstraction For Continual LearningSimon Yu, Gang Li, Weiyan Shi, Peng QiICLR 2026 · 11 citations
- Large Language Model Agents Are Not Always Faithful Self-EvolversWeixiang Zhao, Yingshuo Wang, Yichen Zhang, Yang Deng et al.ICML 2026 · 3 citations
- Beyond Experience Retrieval: Learning to Generate Utility-Optimized Structured Experience for Frozen LLMsXuancheng Li, Haitao Li, Yujia Zhou, Yiqun Liu et al.ACL 2026 · 1 citation
- SkillGen: Learning Domain Skills for In-Context Sequential Decision MakingRuomeng Ding, Wei Cheng, Minglai Shao, Chen ZhaoAAAI 2026
Builds on10
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- Reflexion: language agents with verbal reinforcement learningNoah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan et al.NeurIPS 2023 · 5,828 citations
- Self-Refine: Iterative Refinement with Self-FeedbackAman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan et al.NeurIPS 2023 · 4,972 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
- WebShop: Towards Scalable Real-World Web Interaction with Grounded Language AgentsShunyu Yao, Howard Chen, John Yang, Karthik NarasimhanNeurIPS 2022 · 1,477 citations
Related papers
- Branch-and-Browse: Efficient and Controllable Web Exploration with Tree-Structured Reasoning and Action MemoryShiqi He, Yue Cui, Xinyu Ma, Yaliang Li et al.ACL 2026 · 5 citations
- WebRL: Training LLM Web Agents via Self-Evolving Online Curriculum Reinforcement LearningZehan Qi, Xiao Liu, Iat Long Iong, Hanyu Lai et al.ICLR 2025
- Learning to Contextualize Web Pages for Enhanced Decision Making by LLM AgentsDongjun Lee, Juyong Lee, Kyuyoung Kim, Jihoon Tack et al.ICLR 2025
- Web Agents with World Models: Learning and Leveraging Environment Dynamics in Web NavigationHyungjoo Chae, Namyoung Kim, Kai Tzu-iunn Ong, Minju Gwak et al.ICLR 2025 · 2 citations
- WebArena: A Realistic Web Environment for Building Autonomous AgentsShuyan Zhou, Frank F. Xu, Hao Zhu, Xuhui Zhou et al.ICLR 2024 · 1,197 citations
