Preview — full styling will appear after the next deploy completes.

agentic-ai-patterns

ReAct

Reason + Act

The foundational agent loop — the LLM alternates between reasoning about what to do and calling a tool until it has enough information to answer.

flowchart TD
    S([__start__]) --> L[llm]
    L -->|tool_calls| T[tools]
    T --> L
    L -->|no tool calls| E([__end__])

ReAct (Reason + Act) is the foundational pattern underlying most LLM agents. The model runs in a loop: it reasons about the task, decides which tool to call, receives the tool's result, then reasons again — repeating until it produces a final answer. This mirrors how a person would iteratively look things up before writing a report.

In LangGraph, the pattern is expressed as a two-node graph: an `agent` node that runs the LLM and a `tools` node that executes whichever tools the model requested. A `tools_condition` edge routes back to the agent after each tool call, or exits to `__end__` once the model stops requesting tools.

ReAct is the right choice for open-ended tasks where the number of tool calls is unknown upfront. It is simple, debuggable, and composable — every more advanced pattern in this series builds on the same underlying loop.