arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2604.11378cs.AIcs.SYeess.SY
收藏

从代理循环到结构化图:一个用于LLM代理执行的调度理论框架

From Agent Loops to Structured Graphs:A Scheduler-Theoretic Framework for LLM Agent Execution

Hu Wei

AI总结:

本文提出SGH框架,通过将控制流显式化为静态DAG,解决代理循环的隐式依赖、无限恢复循环和调试困难问题,同时分析可控性、表达性和可实现性之间的权衡。

摘要:

构建基于LLM的代理的主要范式是代理循环,即一个语言模型通过不断扩展的上下文窗口决定下一步行动。该范式存在三个结构性缺陷:步骤间的隐式依赖、无界的恢复循环以及可变的执行历史导致调试复杂。本文将代理循环视为一个单一的就绪单元调度器:任何时候最多一个可执行单元处于活动状态,选择激活哪个单元来自不可见的LLM推理而非可查看的策略。这种视角将代理循环和基于图的执行引擎置于同一个语义连续体上。我们提出SGH,结构化图捕获器,将控制流从隐式上下文提升为显式静态DAG。SGH做出三个承诺:执行计划在计划版本内不可变,规划执行和恢复分层为三层,恢复遵循严格的升级协议。这些选择以牺牲一些表达性换取可控性、可验证性和可实现性。我们的贡献包括:一个将经典调度理论应用于LLM代理执行并识别非确定性LLM节点挑战的调度统一框架;70个调查系统中可控性、表达性和可实现性之间的权衡分析;包含节点状态机的正式规范,具有终止和正确性保证;以及具有七组设计的可归因实验框架用于未来验证。这是一篇立场论文和设计提案。我们提供了一个理论框架、设计分析和实验协议,而不是生产实现或实证结果。

英文摘要:

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 DAG. SGH makes three commitments: execution plans are immutable within a plan version, planning execution and recovery are separated into three layers, and 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; and 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑