Dynamic Harness Search: Building Multi-Agent Systems Per-Query via Prediction

Som Sagar, Shasha Li, Hejie Cui, Ransalu Senanayake, Sercan Ö. ArıkarXiv 2026

TL;DR

SHIFT (Searching Harnesses In Forward-pass Trees) is a framework that dynamically constructs the optimal multi-agent "harness"—the specific combination of agents, instructions, and tools—for every individual query. By using a small, learned "architect" model to predict the utility of candidate designs during a Monte Carlo Tree Search (MCTS), SHIFT achieves state-of-the-art accuracy across diverse benchmarks while significantly reducing execution costs compared to fixed-harness baselines.

What Problem Does This Paper Address?

In the world of LLM agents, a "harness" defines the system's architecture: which agents are involved (e.g., a Planner, a Coder, a Verifier), what instructions they follow, and which tools they can access.

The challenge is that the "right" harness is highly query-dependent. A simple factual lookup doesn't need a multi-agent reasoning loop with a Python interpreter; conversely, a complex spreadsheet reconciliation will fail without one. Currently, developers either use a fixed harness (which is often overkill or underpowered) or perform execution-based search (which is prohibitively expensive because you have to run every candidate design to see if it works).

The authors ask: Can we learn to predict which harness will work best for a specific query before we ever hit the "run" button?

Methods

The core of the paper is SHIFT, which treats harness construction as a search problem guided by a learned model.

  1. The Architect: A local, fine-tuned model (Gemma-2-2B) that acts as a project manager. It has two "heads":
  2. Policy Head: Suggests the next best action to build the harness (e.g., "Add a Verifier," "Grant the Calculator tool," or "Stop").
  3. Value Head: Predicts the utility of the current harness. Utility is a balanced score of task success minus execution costs (tokens, latency, etc.).
  4. Executor-Free Search: For a new query, SHIFT uses Monte Carlo Tree Search (MCTS). The Architect explores different harness configurations in a tree structure. Crucially, it only predicts how well a harness will perform; it doesn't actually execute the agents during the search.
  5. Training via Execution: The Architect learns by doing. During training, SHIFT executes various harnesses, measures their actual success and cost, and uses these outcomes to fine-tune the Architect's policy and value predictions.
Overview of the SHIFT framework showing the Architect, MCTS construction, and final execution.

Datasets

The authors evaluated SHIFT on 9,193 tasks across six diverse benchmarks:

  • Short-horizon: GSM8K (math), HotpotQA (multi-hop QA), and MBPP (coding).
  • Long-horizon/Tool-intensive: SpreadsheetBench (Excel tasks), OfficeQA Pro (document reasoning), and GAIA (general assistant tasks).

These benchmarks were chosen to test if SHIFT could correctly identify when to keep things simple and when to scale up complexity.

Key Insights and Ideas

  • Joint Optimization is Key: The researchers found that choosing agents, instructions, and tools together is significantly more effective than optimizing just one aspect. Restricting the search to only tools or only instructions led to a drop in accuracy of up to 9.1 percentage points.
  • Structure Sensitivity: As shown in Figure 3, the benefit of adding structure varies wildly by task. In math (GSM8K), adding more agents actually decreases utility because the cost rises without a corresponding gain in accuracy. In document QA (OfficeQA), adding agents is essential for success.
Utility change across different benchmarks when increasing agents, tools, or directives.
  • Lookahead Matters: A "value-greedy" approach (picking the single best next step) fails because some agents (like a Verifier) only provide value when paired with later components. MCTS allows the Architect to "see" these downstream benefits.
  • Zero-Shot Transfer: An Architect trained only on simple math (GSM8K) successfully transferred its logic to harder math problems (MATH-500), outperforming a fixed single-agent baseline by concentrating its gains on the most difficult problems.

Key Results

SHIFT-search achieved a mean accuracy of 79.9%, outperforming 17 different baselines, including popular frameworks like ReAct, DSPy, and AgentVerse.

  • Accuracy Gains: It exceeded the strongest baseline (Trace) by 7.2 percentage points overall, with massive jumps on complex tasks like OfficeQA (+30%) and GAIA (+15%).
  • Efficiency: A variant called SHIFT-value (which picks the harness with the highest predicted utility from the search tree) achieved higher accuracy than every baseline while using 32% fewer execution tokens than the strongest baseline.
  • Pareto Frontier: Both SHIFT variants sit on the "Pareto frontier," meaning no other tested method was both more accurate and cheaper.
Accuracy-cost Pareto frontier showing SHIFT variants outperforming baselines.

Limitations and Future Work

  • Upfront Training Cost: Training the Architect requires running thousands of harnesses initially to gather data. While this cost is amortized over thousands of future queries, it remains a significant initial investment.
  • Executor Specificity: The current Architects are trained for a specific executor (Gemini 3.5 Flash). If the underlying model changes, the Architect might need retraining to understand the new model's strengths and weaknesses.
  • Future Directions: The authors suggest developing "Generalist Architects" that can generalize across different datasets and executors without needing per-benchmark training.

Summary updated

BibTeX
@misc{sagar2026dynamic,
  author = {Som Sagar and Shasha Li and Hejie Cui and Ransalu Senanayake and Sercan Ö. Arık},
  title = {{Dynamic Harness Search: Building Multi-Agent Systems Per-Query via Prediction}},
  year = {2026},
  eprint = {2610.04137},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.04137},
}
Figure