LLM Agents & Tool Use

ReAct prompting

ReAct, short for 'Reason + Act', is a simple pattern that makes an agent think out loud between every action. Rather than silently jumping to a tool call, the model first writes a short thought about what it is trying to do, then takes one action, then reads the result as an observation, then thinks again. The visible reasoning keeps each next move grounded in what just happened.

Concretely, the loop cycles through three kinds of step: a Thought (free-form reasoning), an Action (a tool call with inputs), and an Observation (the tool's returned result), repeating until the model writes a final answer. Interleaving them — rather than planning everything up front — lets the agent adjust as real results arrive, which is exactly when rigid pre-made plans tend to fall apart.

ReAct was influential because it is almost free: no extra training, just a prompt structure. Its weakness is that the 'thoughts' are still generated text and can be confidently wrong, so the reasoning trace explains what the agent did but does not prove it was right.

Also called
Reason + Actreason-and-act