TL;DR
This paper introduces AgentSwift, a novel framework for automatically designing powerful LLM agents. It tackles the high cost and inefficiency of current methods by using a hierarchical search space that co-optimizes agent workflows and functional components (memory, planning, tool use), guided by a learned value model and uncertainty-aware search. AgentSwift significantly outperforms existing methods, achieving an average of 8.34% performance gain with fewer evaluations.
What Problem Does This Paper Address?
Designing effective LLM agents is a major challenge. Current automated approaches often focus on optimizing just the agent's workflow (the sequence of LLM calls) but neglect crucial components like memory, planning, and tool integration, which are essential for complex tasks. Furthermore, evaluating even a single agent design can be prohibitively expensive, costing tens of dollars. This, combined with inefficient search strategies in vast design spaces, makes discovering novel, high-performing agents a slow and resource-intensive process. AgentSwift aims to overcome these limitations by enabling efficient, cost-effective, and comprehensive automated agent design.
Methods
AgentSwift introduces three key innovations:
- Hierarchical Search Space: It formalizes a search space that jointly models the agentic workflow and composable functional components (memory, planning, tool use). This allows for richer agent architectures beyond fixed workflow structures and enables co-optimization of both workflow and components.
- Value Model for Low-Cost Evaluation: A predictive "value model" is trained to estimate an agent's performance on a given task. This model is trained on a high-quality dataset generated using a novel strategy combining combinatorial coverage (to ensure comprehensive exploration of interactions) and balanced Bayesian sampling (to select diverse agent candidates from both high- and low-performing regions). This significantly reduces the need for expensive real-world evaluations.
- Uncertainty-Guided Hierarchical MCTS: A Monte Carlo Tree Search (MCTS) strategy guides the exploration. This MCTS operates hierarchically, iteratively improving agents through recombination, mutation, and refinement of both workflows and functional components. Crucially, it uses uncertainty estimates from the value model to prioritize exploration of promising but uncertain regions of the design space, making the search more targeted and efficient.
Datasets
The paper does not explicitly list newly introduced benchmarks. However, it uses seven widely-used benchmark datasets for evaluation, spanning domains such as:
- Embodied: ALFWorld, ScienceWorld
- Math: MATH
- Web: WebShop
- Tool: TravelPlanner, M3ToolEval
- Game: PDDL
The value model is trained on a dataset constructed using a combination of pairwise covering arrays and balanced Bayesian sampling.
Key Insights and Ideas
- Co-optimization is Key: Simply optimizing workflows isn't enough. Integrating and optimizing functional components like memory, planning, and tool use alongside the workflow is crucial for discovering truly powerful and adaptable agents.
- Value Models are Game-Changers: Using a learned value model to predict agent performance dramatically reduces the cost and time required for agent search, making exploration feasible in large design spaces.
- Uncertainty is Your Friend: Guiding the search with uncertainty estimates from the value model is vital for efficiently navigating complex design spaces. It helps avoid getting stuck in local optima and ensures exploration of potentially high-performing but currently under-evaluated agent designs.
- Hierarchical Search Pays Off: A hierarchical approach that considers both the overall workflow and individual components allows for more flexible and expressive agent architectures.
Key Results
- Performance Gains: AgentSwift discovers agents that achieve an average performance gain of 8.34% over both existing automated agent search methods and manually designed agents across seven diverse benchmarks.
- Efficiency: The framework exhibits steeper and more stable search trajectories, discovering high-performing agents with significantly fewer evaluations compared to baselines.
- Model Agnosticism: Discovered agents demonstrate strong cross-model transferability, meaning they perform well even when deployed on different LLM backbones.
- Value Model Accuracy: The value model shows high predictive accuracy and strong transferability to unseen tasks with minimal fine-tuning, demonstrating remarkable sample efficiency.
Limitations and Future Work
- Heuristic-Based Generation: The current method for proposing new agents (recombination, mutation, refinement) relies on heuristic LLM prompts. The authors suggest that directly training a model to map task specifications to agent designs could be a more principled approach.
- Data Dependency: While the value model shows good generalization, it still requires labeled training data, which can be costly for specialized or interactive environments. Future work could explore self-supervised or preference-based learning to reduce this dependency.
- Static Design: AgentSwift focuses on static agent design. The authors suggest that enabling agents to dynamically adapt or recompose their workflows based on real-time execution feedback would lead to more adaptive and robust systems.
Summary updated