From Agent Loops to Structured Graphs: A Scheduler-Theoretic Framework for LLM Agent Execution
Summary: arXiv:2604.11378v1 Announce Type: new
Abstract: The dominant paradigm for building LLM based agents is the Agent Loop, an iterative cycle where a single language model decides what to do next by reading an ever-growing context window. This paradigm has three structural weaknesses: implicit dependencies between steps, unbounded recovery loops, and mutable execution history that complicates debugging.
We characterize the Agent Loop as a single ready unit scheduler: at any moment, at most one executable unit is active, and the choice of which unit to activate comes from opaque LLM inference rather than an inspectable policy. This perspective places Agent Loops and graph-based execution engines on a single semantic continuum.
We propose SGH, Structured Graph Harness, which lifts control flow from implicit context into an explicit static Directed Acyclic Graph (DAG). SGH makes three commitments:
- Execution plans are immutable within a plan version.
- Planning execution and recovery are separated into three layers.
- Recovery follows a strict escalation protocol.
These choices trade some expressiveness for controllability, verifiability, and implementability. Our contributions are fourfold:
- A scheduler unified framework that applies classical scheduling theory to LLM agent execution and identifies challenges introduced by non-deterministic LLM nodes.
- A trade-off analysis of controllability, expressiveness, and implementability across 70 surveyed systems.
- A formal specification including a node state machine with termination and soundness guarantees.
- An attributable experimental framework with a seven-group design for future validation.
This is a position paper and design proposal. We provide a theoretical framework, design analysis, and experimental protocol, not a production implementation or empirical results.
Key Insights
The shift from Agent Loops to Structured Graphs represents a significant advancement in the architecture of LLM agents. The limitations of the traditional Agent Loop—where the model’s context can lead to unpredictable behaviors—are addressed through the structured approach of the SGH. By implementing a static DAG, developers can ensure that the execution flow is not only clear but also manageable, allowing for enhanced debugging and oversight.
Future Implications
The proposed framework opens up new avenues for research and development in the field of artificial intelligence. By establishing a more rigorous and structured method for agent execution, it paves the way for improved performance and reliability of LLMs in practical applications. As the field continues to evolve, the integration of these frameworks will be crucial in overcoming existing challenges and unlocking new capabilities.
In conclusion, the transition from Agent Loops to the Structured Graph Harness signifies a paradigm shift that holds promise for the future of LLM agent execution, emphasizing the need for a more controlled and transparent approach in AI development.
