AI Agent Architecture — ReAct, Memory, Planning and Multi-Agent Systems · ReAct — the Reasoning and Acting Loop
Reflexion — an agent learning from its own mistakes via self-reflection
ReAct — the Reasoning and Acting Loop
Introduction
Reflexion (Shinn et al. 2023) is an extension of ReAct that adds a third temporal level: in addition to in-context Thought and external Observations, after a failed episode the agent generates a "Reflection" — a verbal summary of what went wrong and how to fix the strategy. These reflections are stored in episodic memory and injected into the context of the next episode. The mechanism lets the agent improve across attempts without modifying model weights — it is effective "few-shot learning over episodes" rather than gradient descent.