State updates and reducers
Nodes do not edit the state. They return small updates, and a rule per key decides how each update is merged. Watch a value get replaced, a list grow, a failed attempt to clear it, and the Overwrite fix.
11 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 11 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