< Explain other AI papers

AgentSPEX: An Agent SPecification and EXecution Language

Pengcheng Wang, Jerry Huang, Jiarui Yao, Rui Pan, Peizhi Niu, Yaowenqi Liu, Ruida Wang, Renhao Lu, Yuwei Guo, Tong Zhang

2026-04-22

AgentSPEX: An Agent SPecification and EXecution Language

Summary

This paper introduces AgentSPEX, a new way to build and manage AI agents powered by large language models. It's a system designed to make creating complex agent workflows easier to understand, modify, and control.

What's the problem?

Currently, building AI agents often involves giving a language model a single instruction and letting it figure things out step-by-step, which can be unpredictable. While some frameworks try to add structure, they often tie that structure tightly to programming code, making it hard to change or maintain the agent's behavior without being a skilled programmer. Essentially, existing methods lack a good balance between flexibility and control.

What's the solution?

AgentSPEX solves this by creating a specific language for *describing* how an agent should work. Think of it like a blueprint. This language allows you to define the steps an agent takes, how those steps connect (like branching paths or repeating loops), and how information is stored and used. It also includes a visual editor so you can see and modify the workflow easily. The system then runs these workflows in a safe environment with tools the agent needs, and keeps track of everything it does.

Why it matters?

This work is important because it makes building sophisticated AI agents more accessible to people who aren't necessarily expert programmers. By providing a clearer, more modular way to define agent behavior, AgentSPEX can lead to more reliable, understandable, and maintainable AI systems, especially for complex tasks like research.

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.