What is Reflexion?

Reflexion is an agent technique where the model verbally critiques its own failed attempts and stores those reflections in memory, so later attempts at the same task improve without retraining the weights.

Reflexion, introduced by Shinn et al. in 2023, reinforces a language agent through self-generated linguistic feedback rather than gradient updates. After an attempt at a task, the agent receives a feedback signal (a test failure, a wrong answer, a scalar reward), then writes a short verbal reflection on what went wrong and how to do better. That reflection is kept in an episodic memory buffer and prepended to the next attempt, acting as a kind of semantic gradient that points the agent toward improvement. Because nothing in the model is fine-tuned, Reflexion is cheap and fast compared with reinforcement learning, and it works across decision-making, coding, and reasoning benchmarks. It is closely tied to agent memory: the reflections accumulate as durable lessons the agent can reuse, which is exactly the role a long-term memory store plays for agents in production. Reflexion pairs naturally with ReAct (act, observe failure, reflect, retry) and is a building block for self-improving agents that get better at a recurring task over many runs without any offline training step.