The paper proposes SHIFT, a method that constructs a multi-agent system (harness) tailored to each query without running candidate designs during search. A small local LLM architect learns to predict the utility of possible harness configurations, balancing accuracy and execution cost. Monte Carlo tree search uses these predictions to explore combinations of agents, instructions, and tools, and only the chosen harness is executed.
Across nine thousand tasks from six benchmarks, SHIFT achieves about 80% mean accuracy, outperforming seventeen baselines by up to 7.2 percentage points. A cheaper variant uses 32% fewer execution tokens than the strongest baseline while still surpassing all baselines in accuracy. Jointly optimizing structure, instructions, and tools yields 9.1 percentage points higher accuracy than optimizing any single component alone.