Skip to content

ReAct

ReAct is an agent pattern that interleaves reasoning with actions and observations. New tool results can change what the model does next.1

decide: current weather is needed
act: call the weather tool
observe: rain begins at 4 PM
decide: search for a morning train
act: call the train tool
observe: an 8 AM seat is available
answer: recommend the morning option

This differs from two fixed tool calls because the second action depends on the first observation.

Use an allowlist, argument validation, a step limit, timeouts, and an escalation path. “Think, act, repeat forever” is not a production control loop.

  1. Yao et al., “ReAct: Synergizing Reasoning and Acting in Language Models”, ICLR 2023.