Typed state, routing and graph execution 00:00:01 A billing request reaches shipping The route map contains a perfectly good billing branch. Yet Mal's refund question lands with shipping. Erasing and redrawing the entire map would destroy the evidence she needs. She freezes the run at the point where one edge became active. A graph makes control explicit through nodes, edges and a state schema. Nodes produce updates, routes choose permitted transitions and reducers define how concurrent updates combine. A cycle is meaningful only when the controller can terminate it. Preserve the original words, the router's derived intent and the chosen destination. A later billing lookup can supply source records without overwriting what the customer originally asked. 00:00:46 Trace the router's actual inputs Record the original request independently from derived fields. This allows later inspection even when a rewrite changes the query. A node returns a state update and a validated edge chooses a declared destination. A compiled graph may still route incorrectly on an unseen input. Compare the expected edge with the run trace and inspect state before routing. This separates classification errors from retrieval errors in the selected branch. 00:01:15 Separate graph and running state A DAG expresses a bounded flow with no cycles. A retrieval workflow that can revise a query needs a cycle or an explicitly unrolled sequence. Cycles require a termination condition. Track remaining attempts and stop when evidence is sufficient or the next pass cannot add useful information. Draw a branch that can revisit retrieval. Add a decreasing attempt counter and an explicit exit when no usable evidence remains. A graph state schema specifies which fields survive transitions and how updates combine. Separate the original question, current query, retrieved IDs, retry count and terminal status. Overwriting the original question during a rewrite makes it difficult to evaluate whether the final answer still satisfies the request. After a rewrite, preserve both the original question and the derived query. Grade the final answer against the original question. A router maps evidence about the request to a finite set of permitted destinations. Validate a model-produced route against this set and define a fallback. For a support bot, a billing question may require a different knowledge source from a product setup question. A request with a billing code is routed to product help. Inspect the router’s allowed labels and the state immediately before its decision. A diagram helps inspect possible paths. a trace helps explain one actual run. Preserve the state entering a router and the decision it returned. This makes control errors distinguishable from failures of the tool invoked downstream. 00:02:56 Which edge was really taken? The diagram contains the correct billing edge but a live trace used shipping. Where is the most diagnostic evidence? The graph describes allowed transitions. The trace records which transition occurred and the state used to choose it. Read the observed path beside the legal graph. A graph can permit the right action and still take the wrong one when a particular router label is mistaken.