Zing Forum

Reading

From Agent Loop to Structured Graph: An LLM Agent Execution Framework Based on Scheduling Theory

This paper characterizes the agent loop paradigm as a single-ready unit scheduler, proposes the Structured Graph Harness (SGH) framework, and elevates control flow from implicit context to an explicit static DAG. Through execution plan immutability, three-layer separation, and a strict escalation recovery protocol, SGH balances controllability, verifiability, and implementability.

智能体循环结构化图调度理论LLM智能体可控性可验证性执行框架DAG
Published 2026-04-13 20:16Recent activity 2026-04-14 11:25Estimated read 8 min
From Agent Loop to Structured Graph: An LLM Agent Execution Framework Based on Scheduling Theory
1

Section 01

[Introduction] From Agent Loop to SGH Framework: A New Paradigm for LLM Agent Execution Based on Scheduling Theory

This paper focuses on the evolution of LLM agent execution paradigms and points out three structural weaknesses of the current mainstream agent loop: implicit dependencies, unbounded recovery loops, and variable execution history. By introducing a scheduling theory perspective (characterizing the agent loop as a single-ready unit scheduler), it proposes the Structured Graph Harness (SGH) framework, which elevates control flow from implicit context to an explicit static DAG. Through execution plan immutability, three-layer separation, and a strict escalation recovery protocol, SGH balances controllability, verifiability, and implementability, providing a new direction for building more reliable agent systems.

2

Section 02

Background: Dominance of the Agent Loop and Three Structural Weaknesses

The mainstream paradigm of current LLM agent systems is the agent loop, whose core is an iterative cycle: the model reads historical context to decide the next action and repeats until the task is completed. It is widely adopted due to its simplicity and flexibility (e.g., frameworks like ReAct). However, as task complexity increases, its structural weaknesses are exposed:

  1. Implicit Dependencies: Step dependencies are implicitly transmitted through context, leading to unpredictable behavior, high error rates, and poor maintainability;
  2. Unbounded Recovery Loops: Error recovery attempts may continue indefinitely, wasting resources and being difficult to intervene;
  3. Variable Execution History: Dynamically accumulated historical records contain redundant information, making it hard to debug exceptions. These are all structural flaws inherent to the paradigm itself.
3

Section 03

Methodology: Scheduling Theory Perspective and SGH Framework Design

Scheduling Theory Perspective

The agent loop is characterized as a single-ready unit scheduler in scheduling theory: at any time, there is at most one active unit, execution decisions depend on LLM's implicit reasoning, and there is a lack of explicit control structures. This perspective reveals its connection to graph execution engines and provides theoretical tools for improvement.

Core Design of SGH Framework

SGH elevates control flow to an explicit static DAG (nodes are execution units, edges are dependencies/control flows) and makes three commitments:

  1. Execution Plan Immutability: The structure remains unchanged within the plan version, eliminating debugging problems caused by variable history;
  2. Three-Layer Separation: Planning (creating optimized plans), execution (scheduling nodes), and recovery (handling exceptions) are independent layers;
  3. Strict Escalation Recovery Protocol: Defines escalation rules for failure handling to prevent unbounded recovery loops.
4

Section 04

Analysis and Theoretical Guarantees: Trade-offs and Formal Specifications

Trade-off Analysis

SGH sacrifices some expressiveness (e.g., adaptive behavior requires more complex mechanisms) in exchange for improved controllability and verifiability. Analysis of 70 systems shows that existing systems are widely distributed; SGH outperforms the agent loop in controllability/verifiability and is more flexible than fully static workflows.

Formal Specifications and Theoretical Guarantees

SGH includes strict specifications: defines node state machines (wait/ready/running/success/failure, etc.), state transition rules, and termination conditions. The specification proves that when conditions such as no cyclic dependencies and convergence of the recovery protocol are met, execution will terminate in a finite number of steps and the results are sound.

5

Section 05

Experimental Framework and Future Verification Directions

This is a position paper focusing on theory and design, without providing complete empirical results, but proposes an attributable experimental framework: uses seven design guidelines to guide future verification, covering the evaluation of tasks with different complexities, failure modes, and recovery strategies. The goal is to quantify the advantages and disadvantages of SGH compared to other paradigms, verify the correctness of theoretical analysis, and optimize the framework.

6

Section 06

Conclusion and Outlook: Significance of SGH Framework and Future Work

The SGH framework is an important evolution of the agent execution paradigm. Through the scheduling theory perspective and explicit graph structure, it solves the structural weaknesses of the agent loop and provides a theoretical foundation and practical guide for reliable and maintainable agent systems.

Future work directions:

  1. Complete implementation of the SGH framework;
  2. Large-scale evaluation in real scenarios;
  3. Explore integration with multi-agent coordination, tool learning, memory management, and other technologies. As agent tasks become increasingly critical, frameworks like SGH that provide strict guarantees will become more important.