State graphs
A state graph models an agent as nodes that read and write one shared state, joined by edges that decide which node runs next. The loops in this trail (tool useTool useFunction calling gives the model hands: it asks, and code does the work.Opens in a new tab, ReActReActReason, act, observe, repeat: planning, tool use and a loop in one pattern.Opens in a new tab, reflectionReflectionCritique the output before finalizing it: one agent does, another reflects.Opens in a new tab) are all drawn this way, so the shape is worth knowing before the loops.
Three parts
The LangGraph docs define the state like this:
A shared data structure that represents the current snapshot of your application.
| Part | What it is | In LangGraph |
|---|---|---|
| State | The shared snapshot, usually a typed dict | class State(TypedDict) |
| Node | A function: state in, partial update out | add_node |
| Edge | Which node runs next, fixed or chosen | add_edge, add_conditional_edges |
A node returns only what it changed, and the graph merges that into the state. Several edges leaving one node run those nodes in parallel, in the same super-step. A super-step is one pass over the graph, and nodes that run one after another belong to separate ones.
Shaping the state and the edges so a graph stays readable and certain to stop is graph engineeringGraph engineeringDesigning the graph itself: what lives in state, how big a node is, where it loops and where it stops.Opens in a new tab.
Sources
- Graph API overview, LangGraph docs · accessed October 5, 2026
- Thinking in LangGraph, LangChain docs · accessed October 5, 2026