Abstract
Large Language Model (LLM) agents frameworks often employ modular architectures, incorporating components such as planning, reasoning, action execution, and reflection to tackle complex tasks. However, quantifying the contribution of each module to overall system performance remains a significant challenge, impeding optimization and interpretability. To address this, we introduce CapaBench (Capability-level Assessment Benchmark), an evaluation framework grounded in cooperative game theory's Shapley Value, which systematically measures the marginal impact of individual modules and their interactions within an agent's architecture. By replacing default modules with test variants across all possible combinations, CapaBench provides a principle method for attributing performance contributions. Key contributions include: (1) We are the first to propose a Shapley Value-based methodology for quantifying the contributions of capabilities in LLM agents; (2) Modules with high Shapley Values consistently lead to predictable performance gains when combined, enabling targeted optimization; and (3) We build a multi-round dataset of over 1,500 entries spanning diverse domains and practical task scenarios, enabling comprehensive evaluation of agent capabilities. CapaBench bridges the gap between component-level evaluation and holistic system assessment, providing actionable insights for optimizing modular LLM agents and advancing their deployment in complex, real-world scenarios.
Introduction
Modern AI agents are no longer simple single-prompt systems; they have evolved into complex agentic workflows. These workflows orchestrate specialized modules for planning, reasoning, executing actions, and reflecting on errors—architectures exemplified by frameworks like ReAct or AutoGPT. However, evaluating these modular systems has traditionally been a "black-box" endeavor. Developers typically look at final success rates and guess which component drove the outcome.
Traditional ablation studies, which remove one component at a time, fail to capture synergy—the critical interactions where a reasoning module's effectiveness might depend entirely on the quality of the preceding planning step. Without a principled method to attribute success to specific modules, it is difficult to determine where to allocate computational resources or which components require the most refinement.
Methodology: The CapaBench Framework
To solve the attribution problem, we propose a methodology that treats an agentic workflow as a cooperative game. In this model, individual components (Planning, Reasoning, Action, and Reflection) act as "players" working together to achieve a "payout" (the task success score).
Shapley Value Attribution
We utilize the Shapley Value, a Nobel-prize-winning concept from game theory, to calculate the average marginal contribution of each component. This involves evaluating the agent across all $2^n$ possible configurations of its $n$ modules. For a standard four-component architecture, this results in 16 distinct combinations.
The P-R-A-F Architecture
We define a standardized four-component agent architecture:
- Planning (P): Decomposing complex tasks into manageable steps.
- Reasoning (R): Maintaining logical progression and knowledge inference.
- Action (A): Executing tool calls and formatting environment interactions.
- Reflection (F): Performing error analysis and self-correction.
By systematically replacing baseline modules (e.g., Llama-3-8B) with target models (e.g., GPT-4o or Claude 3.5), we can precisely measure the performance shift attributable to each specific capability.
CapaBench: A Comprehensive Assessment Suite
To validate this framework, we developed CapaBench, a dataset comprising 1,535 tasks across seven diverse scenarios. These scenarios are designed to stress-test specific agentic capabilities:
- Daily Activities: Online shopping (WebShop), navigation planning, and ticket ordering.
- Computation: Mathematical problem solving (MATH) and automatic theorem proving (ATP).
- Role Control: Multi-agent robot cooperation (RoCoBench).
- Operating Systems: Complex terminal and Git-based tasks.
Key Results and Insights
Our analysis reveals several critical findings regarding the internal dynamics of LLM agents:
- Task-Specific "MVPs": The most valuable component varies by domain. For instance, Math and Theorem Proving are Action-Dominant, where success hinges on precise tool execution. In contrast, OS tasks and Robot Coordination are Reasoning-Dominant, requiring high-level logic and adaptation.
- The Reflection Paradox: Across nearly all benchmarks, the Reflection (F) component consistently yielded the lowest Shapley values. This suggests that if a model lacks the inherent capability to identify the root cause of an error, the "reflection" step provides negligible marginal benefit.
- Quantifiable Synergy: The framework identifies non-linear interactions. A strong Planning module can actually have negative synergy with a weak Reasoning module if it generates plans too complex for the agent to execute.
- Ranking Stability: While absolute Shapley values vary depending on the baseline model, the relative importance of components remains remarkably consistent across different model pairings.
Conclusion
CapaBench provides a rigorous, game-theoretic foundation for understanding and optimizing modular LLM agents. By moving beyond black-box evaluation, developers can now identify the true "MVPs" of their workflows. Future work will explore approximation methods like KernelSHAP to scale this analysis to even more granular architectures and investigate dynamic, recursive agent structures.
Summary updated