Lune

ACL2025Top-tier venue

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 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.

5 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • ReasoningBank: Scaling Agent Self-Evolving with Reasoning Memory cites Self-Refine: Iterative Refinement with Self-Feedback
  • Large Language Model Agents Are Not Always Faithful Self-Evolvers cites ReasoningBank: Scaling Agent Self-Evolving with Reasoning Memory
  • Large Language Model Agents Are Not Always Faithful Self-Evolvers cites Reflexion: language agents with verbal reinforcement learning
  • Large Language Model Agents Are Not Always Faithful Self-Evolvers cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Large Language Model Agents Are Not Always Faithful Self-Evolvers cites WebShop: Towards Scalable Real-World Web Interaction with Grounded Language Agents
  • SkillGen: Learning Domain Skills for In-Context Sequential Decision Making cites Reflexion: language agents with verbal reinforcement learning
  • SkillGen: Learning Domain Skills for In-Context Sequential Decision Making cites WebShop: Towards Scalable Real-World Web Interaction with Grounded Language Agents
  • Self-Refine: Iterative Refinement with Self-Feedback cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Generative Agents: Interactive Simulacra of Human Behavior cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • PolySkill: Learning Generalizable Skills Through Polymorphic Abstraction For Continual Learning cites Generative Agents: Interactive Simulacra of Human Behavior
  • Reflexion: language agents with verbal reinforcement learning cites Self-Refine: Iterative Refinement with Self-Feedback
  • Reflexion: language agents with verbal reinforcement learning cites Generative Agents: Interactive Simulacra of Human Behavior
  • Reflexion: language agents with verbal reinforcement learning cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Reflexion: language agents with verbal reinforcement learning cites WebShop: Towards Scalable Real-World Web Interaction with Grounded Language Agents
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers5

  1. ReasoningBank: Scaling Agent Self-Evolving with Reasoning MemorySiru Ouyang, Jun Yan, I-Hung Hsu, Yanfei Chen et al.ICLR 2026 · 244 citations
  2. PolySkill: Learning Generalizable Skills Through Polymorphic Abstraction For Continual LearningSimon Yu, Gang Li, Weiyan Shi, Peng QiICLR 2026 · 11 citations
  3. Large Language Model Agents Are Not Always Faithful Self-EvolversWeixiang Zhao, Yingshuo Wang, Yichen Zhang, Yang Deng et al.ICML 2026 · 3 citations
  4. 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
  5. SkillGen: Learning Domain Skills for In-Context Sequential Decision MakingRuomeng Ding, Wei Cheng, Minglai Shao, Chen ZhaoAAAI 2026

Builds on10

  1. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
  2. Reflexion: language agents with verbal reinforcement learningNoah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan et al.NeurIPS 2023 · 5,828 citations
  3. Self-Refine: Iterative Refinement with Self-FeedbackAman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan et al.NeurIPS 2023 · 4,972 citations
  4. 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
  5. WebShop: Towards Scalable Real-World Web Interaction with Grounded Language AgentsShunyu Yao, Howard Chen, John Yang, Karthik NarasimhanNeurIPS 2022 · 1,477 citations

Related papers

  1. 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
  2. WebRL: Training LLM Web Agents via Self-Evolving Online Curriculum Reinforcement LearningZehan Qi, Xiao Liu, Iat Long Iong, Hanyu Lai et al.ICLR 2025
  3. Learning to Contextualize Web Pages for Enhanced Decision Making by LLM AgentsDongjun Lee, Juyong Lee, Kyuyoung Kim, Jihoon Tack et al.ICLR 2025
  4. 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
  5. WebArena: A Realistic Web Environment for Building Autonomous AgentsShuyan Zhou, Frank F. Xu, Hao Zhu, Xuhui Zhou et al.ICLR 2024 · 1,197 citations
Dusk over the sea between two cliffs drawn in fine vertical lines