AI

Tree-Search and Hierarchical Agents: What Actually Works in Production

Anthropic's own multi-agent research system beat a single agent by 90% on hard tasks — at 15 times the token cost. This is the real tradeoff behind every "just add more agents" pitch.

Every agent loop eventually runs into problems that a single reasoning path can't reliably solve — not because the model is too weak, but because the problem genuinely has multiple viable approaches and the loop has no way to compare them without trying more than one. That's the case for tree-search and hierarchical patterns, and the honest version of that story includes exactly how much they cost to run, because the cost is not incidental — it's most of the mechanism.

What Tree-of-Thoughts Actually Buys

The clearest demonstration comes from the original Tree of Thoughts research: on a benchmark task called Game of 24 — a puzzle explicitly designed to require exploring multiple solution paths — GPT-4 using standard chain-of-thought reasoning solved just 4% of tasks. The same model using Tree-of-Thoughts, which explores several candidate next-steps as a tree, self-evaluates each branch, and backtracks from dead ends, solved 74%. That's not a marginal improvement; it's the difference between a technique that essentially doesn't work on this class of problem and one that does.

The mechanism is straightforward: a single reasoning path either happens to pick the right branch or it doesn't, and chain-of-thought has no way to know which branch it's on until it's too late to switch. Tree-search pays the cost of exploring several branches specifically to avoid betting everything on the first one.

The Real Cost of Going Multi-Agent

Hierarchical patterns — one orchestrator agent delegating to specialized sub-agents — are the production analogue of tree-search, and Anthropic's own engineering team has published the clearest cost/benefit data available for this pattern. In its writeup on building a multi-agent research system, a lead agent (Claude Opus 4) plans a task and spawns three to five specialized subagents (Claude Sonnet 4) that work in parallel, each with its own context window and no visibility into what its siblings are doing, before the lead agent synthesizes their results.

The performance gain was real: this architecture beat a single-agent system by 90.2% on Anthropic's internal evaluation of hard, breadth-first research tasks — the kind where the right answer depends on gathering and cross-checking information from several independent angles at once. But Anthropic is equally direct about the cost: multi-agent systems used roughly 15 times the tokens of a normal chat interaction, and in a separate evaluation, token usage alone explained about 80% of the variance in how well a system performed. That second figure is the one worth sitting with: most of what the multi-agent architecture bought wasn't a qualitatively different reasoning capability — it was permission to spend far more compute on the same class of problem, structured so that spending scaled without one agent's context collapsing under the weight of it.

PatternWhat it buysWhat it costs
Single ReAct loopFast, cheap, exactCommits to one path; no comparison across approaches
Tree-of-ThoughtsExplores multiple paths, backtracks from dead ends5-10x the iterations of a single path
Hierarchical multi-agentParallel specialized sub-agents, breadth on hard tasks~15x the tokens of a single chat interaction

Search as Training Signal, Not Just Runtime Behavior

A separate line of work uses tree-search not as something the agent does live at inference time, but as a way to generate better training data. Research applying Monte Carlo Tree Search to LLM reasoning uses MCTS to explore reasoning steps offline, collects preference data about which steps led to correct answers, and then fine-tunes the model on that signal. In one reported result, a 7-billion-parameter model's accuracy rose from a baseline to 81.8% (+5.9 points) on a grade-school math benchmark and 76.4% (+15.8 points) on a science-reasoning benchmark after this process. This is a meaningfully different tradeoff than runtime tree-search: the search cost is paid once, during training, rather than on every single query — at the price of needing a full training pipeline rather than just a more elaborate prompt loop.

Where Hierarchical Systems Break

The failure mode is as well-documented as the win. Cognition AI, the company behind the Devin coding agent, published a widely discussed critique arguing that parallel sub-agent architectures are fragile specifically because of context isolation: when sub-agents can't see each other's work, they make decisions that conflict without either one knowing it happened until the outputs are combined. Their illustrative example was a coding task where one sub-agent designed a background asset and another designed a character sprite — reasonable choices individually, incompatible together, because neither agent had the other's context to reason against.

It's worth noting Cognition later published a follow-up softening that position, acknowledging that the landscape had moved since their original post. That reversal is itself useful data: it suggests the failure mode is real but not fixed — it's a function of how much shared context an architecture gives its sub-agents, which is an engineering choice, not an inherent property of running more than one agent.

The Bottom Line

Tree-search and hierarchical agents don't out-think a single loop — they out-spend it, deliberately, on problems where spending more compute genuinely finds a better answer than committing to the first path. The Tree-of-Thoughts and Anthropic multi-agent results both point the same direction: the gains are real and can be large, but they scale with tokens burned, not with some multiplier-free cleverness in the architecture. The decision to reach for either pattern should follow the same logic as reaching for an agent at all — only when the problem has genuinely independent branches worth comparing, and only when the answer is worth what exploring them costs. Whether that math works out at your volume is the economics question that follows directly from this one, and none of it works if the agent has nowhere to put what each branch discovers along the way — which is the memory problem underneath all of it.

Related reading: The Artificial Intelligence hub, How agents remember across steps, The real cost of agentic loops at scale

Explore Related Concepts
Frequently Asked Questions
What is Tree-of-Thoughts and how is it different from a normal agent loop?+

A normal ReAct-style loop commits to one path at a time. Tree-of-Thoughts explores several candidate next-steps in parallel, evaluates which are promising, and can backtrack — trading more computation for the ability to find a better path rather than just the first one that works.

Do multi-agent systems actually outperform single agents?+

On hard, open-ended research tasks, yes — Anthropic reported its multi-agent system beat a single agent by 90.2% in its own evaluation. But the same system used about 15 times the tokens of a single chat interaction, and Anthropic found token usage alone explained roughly 80% of the performance difference.

When do hierarchical multi-agent systems fail?+

The most commonly cited failure mode is context isolation: sub-agents working in parallel do not see each other's work, so they can make decisions that conflict without either agent knowing it happened until the results are combined.

Is Monte Carlo Tree Search used with language models the same as in game-playing AI?+

The underlying search idea is shared, but the application differs: instead of searching game states, MCTS-for-LLM approaches search over reasoning steps, using the search to generate training signal that improves the model's step-by-step choices rather than just picking a move in real time.