The reducer decides what a write does.
A Larkspur Cloud support graph: classify picks a route, a conditional edge sends the question to billing, technical or human, and the handler answers from the handbook. Change the reducer on messages and what each node returns, then read the state after every step.
- Messages in the final state
- Copies of the question
- Route taken
- Answer source
State after each step
Magenta marks the customer’s question
Each row shows what the node returned and the messages list after the reducer merged it. The nodes are deterministic stand-ins for model calls: classify is a keyword rule and each handler answers with the handbook page that shares the most words with the question.
The structured answer
The answer key in the final state