TokenPad

Agents

ReAct

ReAct is an agent pattern where the model alternates between reasoning about what to do next and acting by calling a tool.

Also written: reason and act

The interleaving is the point: reasoning before each action gives the model somewhere to decide, and the tool result grounds the next round of reasoning in something real.

It is the pattern underneath most agent frameworks, whether or not they name it.

In practice

The reason-then-act loop is the shape almost every agent framework implements underneath. Its practical weakness is that the trace grows with every cycle, so cost per iteration rises as the task continues — which is why a hard iteration cap matters more here than in any other pattern, and why worst-case cost is per-iteration cost times that cap.

Common questions

What is the difference between ReAct and chain of thought?

ReAct interleaves reasoning with actions — it can call a tool, read the result and reason again. Chain of thought reasons through to an answer in a single pass with no external input.

Why does a ReAct loop get expensive?

The trace grows with every cycle and is resent each time, so cost per iteration rises as the task continues. Worst-case cost is per-iteration cost times the iteration cap, which is why the cap must exist.

Measure it

More in Agents