TL;DR
BOAD (Bandit Optimization for Agent Design) is a novel framework that automatically discovers the optimal "team" of specialized AI sub-agents to solve complex software engineering tasks. By framing agent design as a multi-armed bandit problem and utilizing an LLM-as-a-judge to reward helpful contributions, BOAD creates hierarchical systems that outperform monolithic models. Remarkably, it allows smaller models to rank near the top of global leaderboards like SWE-bench-Live, surpassing much larger proprietary models.
The Challenge of Monolithic Agents
Large Language Models (LLMs) excel at writing isolated snippets of code, but they frequently stumble on real-world Software Engineering (SWE) tasks. These tasks require navigating massive repositories, reproducing bugs, and implementing multi-file fixes over long horizons.
The authors identify a core flaw in current "monolithic" agent designs: a single agent handles the entire workflow within one continuous reasoning chain. This forces the model to retain massive amounts of irrelevant context—such as remembering the exact steps taken to search for a file while attempting to write a delicate bug fix. This "context bloat" leads to spurious correlations and poor generalization, particularly on new, out-of-distribution problems. While human engineers solve this by delegating sub-tasks, manually designing these hierarchies for AI is difficult because human intuition about "roles" rarely aligns with how LLMs actually process information.
Methods: Bandit Optimization for Agent Design (BOAD)
The researchers introduce BOAD, which treats the discovery of effective sub-agents as a Multi-Armed Bandit (MAB) problem.
- Hierarchical Architecture: Instead of a single agent, BOAD employs an "orchestrator" that coordinates specialized sub-agents (e.g., an "issue analyzer" or a "code navigator").
- Bandit Optimization: Each candidate sub-agent acts as an "arm" in the bandit. The system uses the Upper Confidence Bound (UCB) algorithm to balance exploration (testing new, unproven sub-agent designs) and exploitation (deploying sub-agents with a proven track record).
- Dynamic Archive Expansion: Utilizing a Chinese Restaurant Process (CRP), the system periodically prompts an LLM to "invent" new sub-agent roles, ensuring the search space remains dynamic and isn't artificially constrained.
- Hindsight Credit Assignment: Because a multi-agent team might fail even if one specific sub-agent performed flawlessly, binary success/failure rewards are insufficient. Instead, an LLM-as-a-judge reviews the trajectory and assigns a "helpfulness" score to individual sub-agents, even in failed runs. This provides a dense, accurate signal for the bandit to learn from.
Datasets
BOAD was evaluated on two primary benchmarks:
- SWE-bench-Verified: A curated set of 500 real-world GitHub issues used to measure high-fidelity problem-solving.
- SWE-bench-Live: A more challenging benchmark featuring 300 recent issues, designed to test generalization on problems the model could not have seen during training.
- Design Set: A tiny subset of just 12 issues from the Verified set served as the "training ground" for the BOAD optimization loop.
Key Insights and Ideas
- Context is a Liability: The paper demonstrates that "forgetting" is actually a feature. By delegating to sub-agents, the orchestrator keeps its context window clean, focusing solely on high-level strategy.
- Automatic > Manual: Adding manually designed sub-agents from previous research actually lowered performance. BOAD’s automatically discovered roles proved more compatible with the model's inherent reasoning patterns.
- The "Sweet Spot" for Team Size: Performance peaked with exactly two specialized sub-agents. Adding more (e.g., 4 or 5) degraded performance due to increased communication overhead and coordination complexity.
- Transferability: Sub-agents discovered for one model (like the 36B Seed-OSS) showed an ability to improve other models (like Claude 3.7), though gains were highest when optimized for the specific base model.
Key Results
BOAD demonstrates that automatically discovered hierarchical multi-agent systems significantly improve generalization on challenging long-horizon SWE tasks.
- Leaderboard Success: On SWE-bench-Live, the BOAD system (using a 36B parameter model) achieved a 20.0% resolution rate, ranking second on the leaderboard at the time of evaluation and surpassing much larger models like GPT-4o and Claude 3.5 Sonnet.
- State-of-the-Art for Small Models: On SWE-bench-Verified, BOAD hit 53.2%, setting a new high-water mark for models in the ~30B parameter class.
- Generalization: BOAD showed a 63% improvement over the baseline single-agent setup on out-of-distribution "Live" issues, confirming that hierarchical delegation is key to robust generalization.
Limitations and Future Work
- Error Propagation: The authors noted a failure mode where the orchestrator blindly accepts erroneous output from a sub-agent. Future work could introduce "lightweight verification" steps where sub-agents cross-check each other's work.
- Model Specificity: While transferability exists, the absolute best sub-agents are currently tailor-made for specific models.
- Domain Expansion: The current framework is highly specialized for software engineering. The authors suggest exploring whether BOAD can discover hierarchies for other complex, long-horizon domains like scientific research or legal analysis.
Summary updated