用调度理论重构大模型智能体执行流程,解决循环依赖与不可控问题。
From Agent Loops to Structured Graphs:A Scheduler-Theoretic Framework for LLM Agent Execution
- 将大模型智能体执行视为显式有向图调度,取代隐式循环结构
- 提出三层分离的执行与恢复机制,保证计划不可变性与可验证性
- 适用于需要可追溯、高可控性的复杂智能体系统设计
构建基于大模型的智能体主流范式是智能体循环(Agent Loop),即单一语言模型通过不断增长的上下文窗口决定下一步操作。该范式存在三大结构性缺陷:步骤间隐式依赖、无界恢复循环、可变的执行历史使调试困难。本文将智能体循环视为单个就绪单元调度器:任意时刻最多一个可执行单元处于激活状态,且激活选择来自不可见的模型推理。这一视角将智能体循环与基于图的执行引擎置于同一语义连续体上。提出结构化图调度框架SGH,将控制流从隐式上下文显式化为静态有向无环图。SGH作出三项承诺:计划版本内执行计划不可变;规划、执行与恢复分层分离;恢复遵循严格升级协议。此设计以部分表达能力为代价,换取更强的可控性、可验证性与可实现性。贡献包括:将经典调度理论应用于大模型智能体执行的统一框架,识别非确定性大模型节点引入的挑战;对70个系统的可控性、表达性与可实现性权衡分析;形式化规范包含带终止与正确性保障的节点状态机;以及支持未来验证的七组实验设计框架。本文为立场论文与设计提案,提供理论框架、设计分析与实验协议,非生产级实现或实证结果。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。