HarnessFlow: MCTS-Guided Harness Optimization for LLM Agents
On the map: LLM agents and tool use → General LLM agent frameworks and benchmarks also fits: Software engineering coding agents
Abstract (arXiv)
The performance of large language model (LLM) agents depends on both the underlying model and the harness that governs interaction with tools and the environment. Yet harness design remains largely manual, and automating it requires navigating an open-ended search space through costly end-to-end evaluations. We introduce HarnessFlow, a framework for optimizing complete executable harnesses under a limited candidate-evaluation budget, with the model and task environment held fixed. HarnessFlow organizes candidates and their evaluation histories in a refinement tree, using a Monte Carlo Tree Search (MCTS)-based policy to balance exploitation and exploration. A coding agent refines selected harnesses using archived code, execution feedback, and a library of reusable harness mechanisms. With 15 refinement attempts per benchmark, HarnessFlow achieves the highest mean test scores among the compared methods on six benchmarks spanning agentic tasks, coding, and web interaction. The optimized harnesses achieve an average score of 69.48%, outperforming the initial harnesses and Meta-Harness by 10.89 and 3.95 percentage points, respectively, while incurring lower average per-task execution costs than hand-engineered baselines. These results suggest that structured harness search offers a promising route toward automating the design of capable and efficient LLM agents.
Key facts. No citing papers in the map yet (data through 24 Nov 2026). Placed in General LLM agent frameworks and benchmarks, one of 16 directions in LLM agents and tool use. Builds on 38 of its 45 references that are in the map. Submitted 4 Nov 2026.
Builds on
38 of 45 references.
Closest ancestors · 12
Same direction, newest first
- 2026DarwinX: Evolving Agent Harnesses Through Natural Selection31 Jul
- 2026MASPOB: Bandit-Based Prompt Optimization for Multi-Agent Systems with Graph Neural Networks3 Mar
- 2025MasRouter: Learning to Route LLMs for Multi-Agent Systems16 Feb
- 2025Multi-agent Architecture Search via Agentic Supernet6 Feb
- 2024G-Designer: Architecting Multi-agent Communication Topologies via Graph Neural Networks15 Oct
- 2024AgentSquare: Automatic LLM Agent Search in Modular Design Space8 Oct
- 2024Automated Design of Agentic Systems15 Aug
- 2024EvoAgent: Towards Automatic Multi-Agent Generation via Evolutionary Algorithms20 Jun
- 2024Language Agents as Optimizable Graphs26 Feb
- 2023Language Agent Tree Search Unifies Reasoning Acting and Planning in Language Models6 Oct
- 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Framework1 Aug
- 2023CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Society31 Mar
Other references · 26
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 9,589
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,871
- 2023Generative Agents: Interactive Simulacra of Human Behaviorcited by 3,841
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,799
- 2023AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversationcited by 2,189
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 2,069
- 2023MemGPT: Towards LLMs as Operating Systemscited by 1,655
- 2022WebShop: Towards Scalable Real-World Web Interaction with Grounded Language Agentscited by 1,377
- 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agentscited by 1,155
- 2023Large Language Models as Optimizerscited by 985
- 2025τ2-Bench: Evaluating Conversational Agents in a Dual-Control Environmentcited by 797
- 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 603
14 more
- 2024AppWorld: A Controllable World of Apps and People for Benchmarking Interactive Coding Agentscited by 510
- 2024AFlow: Automating Agentic Workflow Generationcited by 506
- 2026Meta-Harness: End-to-End Optimization of Model Harnessescited by 415
- 2024TextGrad: Automatic "Differentiation" via Textcited by 307
- 2026Agentic Harness Engineering: Observability-Driven Automatic Evolution of Coding-Agent Harnessescited by 199
- 2026Self-Harness: Harnesses That Improve Themselvescited by 158
- 2025A Self-Improving Coding Agentcited by 109
- 2026Hyperagentscited by 80
- 2025Huxley-G"odel Machine: Human-Level Coding Agent Development by an Approximation of the Optimal Self-Improving Machinecited by 73
- 2026HarnessX: A Composable, Adaptive, and Evolvable Agent Harness Foundrycited by 68
- 2026HarnessCompass: Guiding Automatic Harness Evolution toward Generalizable and Effective Agent Harnessescited by 29
- 2026AutoSaddler: Automatic Harness Optimization with Durable Updates from Agent Execution Tracescited by 25
- 2026HARBOR: Automated Harness Optimizationcited by 14
- 2026Beyond Prompts: Measuring and Optimizing LLM Tool-Agent Harnessescited by 7
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026MESH-Harness: Self-Improving Agent Harnesses via Bandit-Guided Compositional Evolution
- 2026Harnesses for Inference-Time Alignment over Execution Trajectories
- 2026HarnessOpt-Bench: Evaluating LLMs at Harness Optimization
- 2026Harnessing Language Models as Optimization Modeling Agents
- 2026Composing Task-specific Agent Harnesses at Test Time with Reusable Primitives
- 2026Where Does Harness-Optimization Value Live? Localized Gains and the Budget-Splitting Trap in Self-Evolving LLM Agents
- 2026Better Harnesses, Smaller Models: Building 90% Cheaper Agents via Automated Harness Adaptation
- 2026Evo-Bench: Can Language Models Improve Agent Harness?