Robots Atlas>ROBOTS ATLAS
Agents

Reflexion

2023ActiveUpdated: 6 May 2026Published
Key innovation
Replaced neural weight updates with verbal reinforcement learning, where the agent verbally reflects on error signals and stores conclusions in episodic memory, enabling rapid adaptation without expensive fine-tuning.
Category
Agents
Abstraction level
Pattern
Operation level
Agent runtimeInference
Use cases
Agents for code generation and debuggingSequential decision-making agentsNavigation and planning agentsTasks requiring iterative improvement

How it works

In each trial, the agent performs a task and receives a feedback signal. A reflection module (the same LLM) analyzes the feedback signal and generates a verbal reflection describing errors and how to avoid them. The reflection is added to an episodic memory buffer. In the next trial, the memory buffer is appended to the agent's context, enabling it to reason based on previous experience.

Problem solved

Traditional reinforcement learning methods require a large number of trials and expensive model fine-tuning; LLM agents should be able to learn quickly from trial-and-error without parameter modification.

Implementation

Implementation pitfalls
Context length limits episodic memoryHigh

As reflections accumulate, the context window fills up, limiting the number of trials from which the agent can learn.

Reflections can reinforce wrong beliefsMedium

If the agent generates incorrect reflections (misattributes failures), subsequent trials may be misguided.

Evolution

Original paper · 2023 · NeurIPS 2023 · Noah Shinn
Reflexion: Language Agents with Verbal Reinforcement Learning
Noah Shinn, Federico Cassano, Edward Berman, Ashwin Gopinath, Karthik Narasimhan, Shunyu Yao
2022
ReAct - combining reasoning and acting

Yao et al. propose ReAct, interleaving reasoning traces with actions, precursor to Reflexion.

2023
Reflexion (Shinn et al., NeurIPS 2023)
Inflection point

Shinn et al. introduce verbal reflection with episodic memory as a substitute for RL fine-tuning.

2024
Reflexion integrated into agent frameworks

Reflexion-style reflection is adopted in LangChain, AutoGen, and other agent frameworks.