Skip to content

Vol. III · Single-Agent Patterns · III.5

ReAct and Tool Use

Thought, action, observation. The original agent pattern. Still the right inner loop — as long as 'thought' is optional and 'action' is schema-bound.

6 min read

Doctrine

  • Prefer native tool calling (structured outputs) over prompting the model to emit 'Action:'.
  • Thought traces are for debugging and for hard reasoning; do not require them on every hop.
  • The observation format is part of the ACI. Ugly observations make stupid agents.

From ReAct paper to function calling

The 2022 ReAct paper interleaved reasoning and acting. Production stacks replaced the text protocol with JSON/function calling (OpenAI, Anthropic, Gemini). Pydantic AI and the Agents SDK make the schema the API. smolagents argues the action language should be code instead — see Code-Act.

Anti-patterns

  • Regex-parsing free-text tool calls in 2026.
  • Tools named do_stuff with a string argument.

Related