Paper 2604.13346
AgentSPEX: An Agent SPecification and EXecution Language
- Published
- Apr 2026
- Research lab
- Independent
- Citations
- 6
- GitHub
- 93 stars
01 In brief
Summary
AgentSPEX is a YAML-based specification and execution language for LLM-agent workflows, designed to overcome the limitations of reactive prompting and Python-coupled orchestration frameworks.
It provides explicit control flow (typed steps, branching, loops, parallel execution), reusable submodules, and explicit context management.
Workflows run in a customizable agent harness offering tool access, a Docker sandbox, checkpointing, tracing, replay, and an observability dashboard.
A visual editor with synchronized graph and YAML views aids authoring.
AgentSPEX includes ready-to-use agents for deep research, scientific proposal generation, and research advising.
Evaluated on 7 benchmarks (SciBench, StemEZ, ChemBench, AIME 2025, ELAIPBench, WritingBench, SWE-Bench Verified), AgentSPEX achieved the highest scores, e.g., 90.61% on SciBench, 100% on AIME 2025, and 77.1% on SWE-Bench Verified, outperforming CoT, ReAct, and existing frameworks.
A user study with 23 participants found AgentSPEX more interpretable and accessible than LangGraph, though LangGraph was preferred for complex workflows.
The paper also discusses formal verification potential and future work on automatic workflow generation and multi-agent orchestration.
02 From the paper
Abstract
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.