Introduction
The rapid proliferation of AI agent frameworks such as LangChain, AutoGen, and CrewAI has led to a fragmented ecosystem. While these tools have accelerated development, they have also introduced significant challenges: framework lock-in, poor reproducibility, and inconsistent performance evaluation. Porting an agent from one stack to another often necessitates a complete rewrite, and hidden execution assumptions make it difficult to compare the efficacy of different agentic architectures.
To address these hurdles, we introduce the Open Agent Specification (Agent Spec). Designed as a declarative, framework-agnostic language, Agent Spec serves as the "ONNX for AI Agents," enabling developers to define agents and workflows once and execute them across diverse runtimes.
Technical Methodology
Agent Spec treats agent definition as a structured configuration rather than framework-specific code. This approach decouples the design of an agent from its execution environment.
Core Abstractions
The specification defines a common set of building blocks:
- Agents: Top-level entities equipped with memory and tools.
- Flows: Directed graphs representing the sequence of operations.
- Nodes: Specific tasks, such as LLM calls or API requests.
- Tools: External functions or services accessible by the agent.
Separation of Flow
A critical innovation in Agent Spec is the explicit distinction between Control Flow Edges (determining the next node to execute) and Data Flow Edges (mapping outputs to inputs). This separation removes ambiguity in complex, looping workflows that often plague current frameworks.
Implementation and Tooling
The ecosystem includes PyAgentSpec, a Python SDK for programmatic authoring and serialization (JSON/YAML), and WayFlow, a reference runtime. Furthermore, Runtime Adapters act as compilers, translating Agent Spec definitions into executable code for established frameworks like LangGraph, AutoGen, and CrewAI.
Evaluation and Results
The portability and performance of Agent Spec were validated across three diverse benchmarks:
- SimpleQA Verified: A factuality benchmark (1,000 questions). Flow-based RAG solutions defined in Agent Spec achieved an 88.1% F1 score, significantly outperforming basic GPT-4.1 mini prompting (17.8%).
- BIRD-SQL: A text-to-SQL benchmark (1,534 questions). The "Plan-Generate-Reflect" flow consistently outperformed standard ReAct agents.
- $\\tau^2$-Bench: A customer service simulation. AutoGen excelled in complex reasoning (73.5% Pass^1), while LangGraph offered lower latency (71.5% Pass^1).
Key Insights
- Framework Sensitivity: Evaluation revealed that the same logic and prompts yield different results across runtimes due to variations in system prompt wrapping and API management.
- The Latency Tax: Multi-agent frameworks like CrewAI can achieve high accuracy but may run up to 140% slower than streamlined runtimes like WayFlow or LangGraph.
Conclusion and Future Work
Agent Spec provides a secure, auditable, and portable standard for agentic systems. By excluding arbitrary code execution in favor of structured descriptions, it promotes enterprise-grade safety. Future work will focus on robust long-term memory persistence, hierarchical planning modules, and the development of visual drag-and-drop authoring tools to broaden accessibility.
Summary updated