cs.CLApr 14, 2026

AgentSPEX: An Agent SPecification and EXecution Language

Authors: Pengcheng Wang, Jerry Huang, Jiarui Yao, Rui Pan, Peizhi Niu, Yaowenqi Liu, Ruida Wang, Renhao Lu, 

Organizations: University of Illinois Urbana-Champaign · Baylor College of Medicine · University of Wisconsin–Madison

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.

Figures & tables

Appendix figures & tables4 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Self-Programmed Execution for Language-Model Agents

    May 7, 2026Luke J. O'ConnorLLM Agent OrchestrationLLM Agents

  2. Lean4Agent: Formal Modeling and Verification for Agent Workflow and Trajectory

    Jun 2, 2026Ruida Wang, Jerry Huang, Pengcheng Wang +3Software Engineering AgentsFormal Verification

  3. Harness as a Language: A Minimalist Agent Framework With Maximal Expressivity

    Sep 22, 2026Zhening Li, Joshua Liu, Mateja Vukelic +7LLM Agent MemoryLLM Agent Self-Improvement