« All posts

AI agents are shifting from loops to graphs

An analysis of the shift from loop-based AI agents to graph-structured architectures, with practical guidance for engineers.

For two years, 'agent' has meant a model in a while loop: call it, run a tool, append the result, repeat until done. This piece argues that everything the industry learned in 2024-2025 — context management, tool design, compaction, stop conditions — was really one discipline: loop engineering. But the loop's ceiling isn't model quality, it's architecture: a serial, opaque scheduler with exactly one active unit of work at a time. That structure can't naturally support parallel subtasks, durable memory, partial failure recovery, human approval gates, or planner-worker architectures.

The author contends the industry has already quietly moved past this: LangGraph shipped a graph-native 1.0, Microsoft merged AutoGen and Semantic Kernel into a structured Agent Framework, durable execution engines like Temporal and Prefect are being bolted under agents, and interop protocols like A2A and ACP are being standardized. Academically, a survey found 60 percent of open-source agent projects still run plain loops, framed as the pattern teams should be growing out of.

Graph engineering means explicitly designing nodes (capability units), edges (typed decision transitions), and a checkpointed, schema-based state object. The loop doesn't disappear — it gets demoted inside individual nodes. Practical implications for engineers: sketch the state schema before writing prompts, keep nodes single-purpose, put judgment in the edges, checkpoint every transition, treat humans as first-class nodes, track budget in state, and evaluate trajectories rather than just outputs. The shift favors systems thinking — state machines, idempotency, backpressure — over prompt-whispering skills.