Skip to content
Mermaid templates

ReAct Agent Loop

Thought → Action → Observation cycle for tool-using agents.

Template previewMermaid
Rendering…

Make it your own.

flowchart LR
G[Goal / user query] --> T[Thought:\nplan next step]
T --> A{Action?}
A -- final answer --> Out[Output answer]
A -- tool call --> Tool["Tool invocation<br/>(search, code, API)"]
Tool --> Obs[Observation:\ntool result]
Obs --> T
classDef think fill:#fef3c7,stroke:#92400e;
classDef act fill:#dbeafe,stroke:#1e3a8a;
classDef obs fill:#dcfce7,stroke:#166534;
class T think
class Tool act
class Obs obs