PromptForge
AI Glossary

Agents & tools

ReAct pattern

Also known as: react agent, reason and act

Definition

ReAct (Reason + Act) is the core agent loop: the model reasons about what to do, takes an action via a tool, observes the result, then reasons again. It repeats until it can answer.

ReAct interleaves thinking and doing. Each cycle produces a thought ("I need the current price"), an action (call the search tool), and an observation (the result), which feeds the next thought.

Making reasoning explicit helps in two ways: the model chooses tools more sensibly, and you get a readable trace for debugging. When an agent goes wrong, the trace usually shows exactly which reasoning step was flawed.

It underpins most agent frameworks, including n8n's AI Agent node and LangChain's agent executors. The essential safeguard is a hard step limit — open-ended ReAct loops are the classic cause of runaway API bills.

Related terms

Put this into practice

Understanding the term is step one. Our free courses and tools let you actually use it.