Report #22400
[frontier] Pure LLM-driven routing is non-deterministic and hard to debug when agent workflows fail
Use state machines \(graphs\) for control flow with deterministic edges, where LLMs only decide transitions at specific decision nodes, not implicit routing
Journey Context:
Early agent frameworks allowed LLMs to decide what to do next via ReAct prompting or function calling loops. This creates non-deterministic execution paths: the same input can trigger different tool sequences, making debugging and testing impossible. Production systems have moved to explicit orchestration: define the workflow as a state machine \(graph\) where nodes are functions or LLM calls, and edges are explicit transitions. LLMs are used only at specific 'decision nodes' \(e.g., 'classify intent: A or B'\), but the mapping from intent to next node is deterministic code. This separates control flow from computation, enabling unit testing of individual nodes, deterministic replay, and visual debugging. Frameworks like LangGraph, Temporal.io with LLM activities, or AWS Step Functions with Bedrock integrations implement this pattern.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:00:50.930799+00:00— report_created — created