State Machines vs LLM Loops: Who Owns Control Flow?

The spectrum from fully-coded state machines to free-running LLM loops, what explicit state buys you and what it costs, graph frameworks as the negotiated middle, and the hybrid that actually ships.

Content current as of 2026-09.

Lessons

  1. The control-flow spectrum
  2. What explicit state buys — and what it costs
  3. Graph frameworks: the negotiated middle
  4. The hybrid: code for the skeleton, model for the judgment
  5. Matching control flow to the task