Skip to main content
Back

UIUC's AgentSPEX Beats LangGraph With YAML-Driven Agents Hitting 100% on AIME

A YAML-based specification language decouples agent workflows from Python code, adding explicit control flow, sandboxed execution, and a visual editor.

Pro

  • AgentSPEX specifies LLM agent workflows in declarative YAML, decoupling logic from Python orchestration code.
  • Supports typed steps, branching, loops, parallel execution, submodules, and explicit context management via named variables.
  • Harness includes Docker sandbox with 50+ tools, checkpointing, selective trace replay, and observability dashboard.
  • Beats CoT and ReAct baselines on 7 benchmarks including 100% on AIME 2025 and 77.1% on SWE-Bench Verified.
  • User study of 23 found it more readable than LangGraph, but LangGraph preferred for complex workflows.
  • Open source at ScaleML/AgentSPEX with deep research, AI Scientist, and AI Advisor demos.

Building an LLM agent today usually means picking between two frustrating options: write a single fat prompt and hope the model figures out the control flow, or wire everything up in Python through an orchestration framework and accept that your workflow logic now lives inside code only engineers can touch. A team from UIUC, Wisconsin, and Baylor is pitching a third path with AgentSPEX, an Agent SPecification and EXecution Language that puts agent workflows into declarative YAML files and runs them inside a sandboxed harness.

ReAct-style prompting leans heavily on the model's inherent capabilities and tends to underperform on longer-horizon tasks that require branching and iteration, especially on cost, reproducibility, and controllability. Frameworks like LangGraph, DSPy, and CrewAI fix some of that with explicit workflow graphs, but their workflows are tightly coupled to Python, which raises the learning curve and makes agents harder to modify, maintain, and share with non-programmers. AgentSPEX separates the workflow from the runtime entirely.

YAML as the executable spec

An AgentSPEX workflow is a YAML file with a name, a goal, some config, and a sequence of operations. The vocabulary is small but covers the patterns most agents need:

  • task starts a new conversation and lets the agent begin a sequence of tool calls, while step supports multi-turn interaction where the model can invoke tools and receive additional instructions across turns while retaining conversation history.
  • Control flow through if, switch, while, and for_each.
  • parallel and gather for concurrency.