arXiv:2604.13346cs.CL2026-04被引 6

用可读性强的声明式语言设计可控的智能体工作流,让复杂任务更透明易维护。

AgentSPEX: An Agent SPecification and EXecution Language

  • 通过声明式语法明确定义智能体的流程控制与状态管理,摆脱隐式推理
  • 支持分支、循环、并行执行和模块复用,提升复杂任务可维护性
  • 提供可视化编辑器与真实应用案例,适合科研与工程团队协作开发

语言模型智能体系统通常依赖反应式提示,即单条指令引导模型完成开放式的推理与工具调用序列,导致控制流和中间状态不明确,行为难以把控。类似LangGraph、DSPy、CrewAI的编排框架虽引入显式工作流定义,但将逻辑与Python代码强耦合,难以维护和修改。本文提出AgentSPEX——一种用于指定大模型智能体工作流的声明式语言,支持显式控制流、类型化步骤、分支与循环、并行执行、可复用子模块及状态管理,并运行于可定制的智能体沙箱环境中,提供工具访问、隔离执行环境、检查点、验证与日志功能。我们还开发了同步图视图与工作流视图的可视化编辑器。提供深度研究与科学调研等现成智能体,评估覆盖7个基准。用户研究表明,AgentSPEX在可解释性与开发友好性上优于主流框架。

原文摘要 · Abstract (English)

Language-model agent systems commonly rely on reactive prompting, in which a single instruction guides the model through an open-ended sequence of reasoning and tool-use steps, leaving control flow and intermediate state implicit and making agent behavior potentially difficult to control. Orchestration frameworks such as LangGraph, DSPy, and CrewAI impose greater structure through explicit workflow definitions, but tightly couple workflow logic with Python, making agents difficult to maintain and modify. In this paper, we introduce AgentSPEX, an Agent SPecification and EXecution Language for specifying LLM-agent workflows with explicit control flow and modular structure, along with a customizable agent harness. AgentSPEX supports typed steps, branching and loops, parallel execution, reusable submodules, and explicit state management, and these workflows execute within an agent harness that provides tool access, a sandboxed virtual environment, and support for checkpointing, verification, and logging. Furthermore, we provide a visual editor with synchronized graph and workflow views for authoring and inspection. We include ready-to-use agents for deep research and scientific research, and we evaluate AgentSPEX on 7 benchmarks. Finally, we show through a user study that AgentSPEX provides a more interpretable and accessible workflow-authoring paradigm than a popular existing agent framework.

智能体工作流可解释性编程语言

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。