Graph frameworks: the negotiated middle

Lesson 3 of 5 in State Machines vs LLM Loops: Who Owns Control Flow?.

The middle of the spectrum has grown its own tooling category: graph orchestration frameworks. The deal they offer is precise — you write the nodes and edges; the model gets a vote only where you install one.

A node is a unit of work (often an LLM call, sometimes plain code). Edges come in two kinds: fixed edges that code follows unconditionally, and conditional edges where a routing function — frequently reading a model’s structured output — picks among destinations you enumerated. State is a first-class object threaded through every node, which is what unlocks the checkpointing and replay dividends from the last lesson without hand-rolling them.

That “low-level” self-description is honest and worth dwelling on. LangGraph doesn’t hand you an agent; it hands you a state schema, nodes, edges, and a checkpointer — persistence at every step, which is what makes pause-for-approval, crash recovery, and time-travel debugging framework features instead of your weekend project. The conditional edge is the whole philosophy in one construct: the model chooses, but only among edges you wrote down.

The category is bigger than one library, and the pattern repeats across it: Mastra builds TypeScript workflows from .then/.branch/.parallel steps with human-in-the-loop suspend and resume; Microsoft’s Agent Framework — the declared successor to both Semantic Kernel and AutoGen — added graph-based workflows as a headline feature. When three ecosystems independently converge on “explicit graph, model votes at marked junctions”, that’s the industry telling you where the production middle ground sits.

Myth: “Using a graph framework means giving up agentic behavior”

A graph with conditional edges and a loop-back edge contains the free-running loop as a special case — one node, one model-routed edge pointing back at itself. The framework doesn’t cap autonomy; it makes the autonomy you grant legible: every place the model can steer is a conditional edge you can point at in a design review.

Myth: “The framework’s checkpointing makes my agent deterministic”

Checkpointing makes the state durable, not the model predictable. Resume a paused run and the next LLM call can still surprise you. The graph guarantees which situations are reachable; it never guarantees what the model says inside one.

Myth: “Graph frameworks are just workflow engines with worse marketing”

Classic workflow engines (and plain workflow code) assume every branch condition is computable. Graph orchestration exists for exactly the branches that aren’t — route this ticket by what it means, not by a regex. If none of your edges need judgment, the myth is true for you: use the boring workflow engine, and revisit whether you need an agent at all.

Interactive checkpoint quiz (2 questions) — open this page in a browser to take it.