State, nodes and edges
Every LangGraph program is built from three parts. Follow two restaurant orders through one graph and watch the state change, a node return a small update, and a conditional edge choose the path.
10 minPro
Checking your access…
Inside this lesson
- An animation you play, pause and step through, with each part saying what it is doing.
- The real code beside it, with the lines for each step lit up.
- Practice mode, where you route each message yourself, and a short quiz.
- About 10 minutes.
Written from the official documentation
In this module: Graph API
- State, nodes and edgesStateGraph, super steps, START, END and compile.Pro
- State updates and reducersHow node returns merge into state, MessagesState and Overwrite.Pro
- Input, output and private stateSeparate schemas, private channels and Pydantic state models.Pro
- Sequences, branches and loopsParallel fan out, conditional edges, deferred nodes, loop limits.Pro
- Send and CommandMap reduce with Send, then update state and route with Command.Pro
- Configure nodesRuntime context, node caching and execution info inside a node.Pro