
Large language models (LLMs) have been increasingly used to interact with external environments such as games, compilers, and APIs as goal-driven agents. However, it remains challenging for these language agents to quickly and efficiently learn from trial-and-error because traditional reinforcement learning methods require extensive training samples and expensive model fine-tuning. Reflexion introduces a framework that reinforces language agents not by updating model weights, but through linguistic feedback. Reflexion agents verbally reflect on task feedback signals and maintain their reflective text in an episodic memory buffer to improve decision-making in subsequent trials. The framework can incorporate different types and sources of feedback, including scalar values, free-form language, external feedback, and internally simulated feedback. Experiments across sequential decision-making, reasoning, and programming tasks demonstrate substantial improvements over baseline agents. Reflexion achieves 91% pass@1 accuracy on the HumanEval coding benchmark and also improves performance on ALFWorld and HotPotQA. The results demonstrate how verbal self-reflection and persistent memory can allow language agents to learn from previous failures without model fine-tuning.