Skip to main content

ReAct loop

AI concepts

A repeating cycle of **Observe** (gather information), **Think** (decide what to do), and **Act** (execute)—the core pattern behind many autonomous AI agents.

ReAct stands for Reasoning and Acting. In each cycle, the system:

  1. Observes — reads files, tool outputs, errors, or other signals.
  2. Thinks — chooses the next step toward the goal.
  3. Acts — runs a tool, edits code, calls an API, etc.

The loop continues until the goal is met or the system stops. Debugging agent behavior often means asking which phase failed: wrong observations, flawed reasoning, or a bad action.