Do Long-Context Multi-Agent Systems Need More Agents?
Splitting a long input into chunks and giving each chunk an agent makes the team grow with the text. Activating agents only for what the question still needs kept the team almost the same size across a 16-fold increase in context.
By Jerry Wang, Haohan Wang, and others · · About our arXiv preprint
Key findings
- In the ANTMAN paper (Jerry Wang, Haohan Wang, and others, University of Illinois Urbana-Champaign, arXiv 2026), growing the searchable context 16-fold, from 32K to 512K tokens, raised ANTMAN's active workers per question only 1.23x (2.57 to 3.17), against 15.29x for LongAgent and 15.33x for Chain of Agents.
- At 512K tokens, ANTMAN used 33.1 model calls and $0.53 per question for 0.840 F1, while LongAgent used 292.5 calls and $1.40 for 0.754 F1, and Chain of Agents 80.2 calls and $1.30 for 0.746 F1 (all with GPT-4.1, arXiv 2609.33326).
- ANTMAN's coordination still grows when the question demands more: at a fixed 512K context, raising the required evidence from 1 to 16 pieces raised active workers from 5.0 to 8.0 and model calls from 35.5 to 86.2, with every answer correct.
- Replacing ANTMAN's explicit Need Graph with free-form adaptive replanning cut F1 at 512K from 84.03 to 64.01 (23.82%) and GAIA accuracy from 60.0% to 50.0%, with a similar number of workers activated (arXiv 2609.33326).
Do long-context multi-agent systems need more agents as the input grows?
A common way to build long-context multi-agent systems is to cut the input into chunks and give each chunk to its own agent. That keeps each agent's context short, but it ties the size of the team to the length of the text. Give the system 16 times more text and it uses about 16 times more agents, even when the question has not changed. Our answer is that this coupling is not necessary: in our experiments, a system that activates agents according to what the question still needs used about three workers per question at 32K tokens and about three at 512K.
The question matters because the cost of a multi-agent system is mostly the cost of its model calls. If every extra chunk brings an extra agent, a longer document becomes proportionally more expensive whether or not the extra text is relevant. In practice, most of what an agent could search, such as a large code repository, a document collection or the open web, has nothing to do with the question at hand.
Our paper, ANTMAN: Adaptive Need Tracking for Multi-Agent Navigation in Large Information Spaces, by Jerry Wang, Haibo Jin, Xiaopeng Yuan, Peng Kuang and Haohan Wang at the University of Illinois Urbana-Champaign, builds the coordination around a different unit: the pieces of information the question still lacks. It borrows an old idea from information science. Marcia Bates's 1989 "berrypicking" model described how a human searcher's understanding of the question changes as they find things, so the search itself changes direction. ANTMAN gives a team of LLM agents an explicit record of that changing state.
Key terms
- Long-context multi-agent system
- A setup in which several LLM agents share the work of reading or searching an input too large for one model call to handle well.
- Partition-driven coordination
- Assigning one agent to each fixed chunk or document of the input, so the number of agents follows the size of the input.
- Information need
- One piece of information the system must still find to answer the question, such as "which company acquired X" before "where is that company based".
- Need Graph
- ANTMAN's running record of the open and resolved information needs, their dependencies, the evidence found for each, past attempts and progress.
- Active coordination
- The average number of distinct worker agents that actually take part in answering one question.
- Lost in the middle
- The tendency of language models to use information at the start or end of a long input better than information in the middle (Liu et al., TACL 2024).
How can a multi-agent system decide how many agents to use?
ANTMAN separates what could be searched from what is being searched. It works in three parts.
A fixed map of the space. The input, whether a long text, a repository or a web environment, is split once into territories. Each territory gets a WorkerCard, a short description of what it covers. This map does not change during a question, and a bigger input gives more territories. The territories are only the candidates.
A Need Graph. For each question, a coordinator model writes down the information needs and how they depend on one another. As evidence comes in, a need can be marked resolved, kept open, rewritten into a narrower need, or joined by a new need that the evidence revealed.
A coordination loop. The coordinator picks an open need, shortlists territories by matching the need against WorkerCards with ordinary retrieval (no model involved), and sends the need to one worker. That worker searches only its own territory and reports what it found, what is still uncertain, and how far it got. The report updates the graph. If a need stops making progress, ANTMAN rewrites it, routes it to another territory, or falls back to a different way of answering it. When the needs are resolved, the evidence attached to them is used to write the answer.
Because every worker activation answers one routing decision for one need, the number of distinct workers in a question can be no larger than the number of needs that came up times the maximum routing attempts per need, and no larger than the number of territories. The paper proves this bound in its appendix. Its point is that the number of territories enters only as a ceiling. If a question needs the same few things, adding more text adds more idle territories, not more work.
How fast does the number of agents grow with context length?
To test this, the authors took the multi-needle setting of Needle-in-a-Haystack PLUS, introduced with LongAgent, and asked 10 questions with the evidence placed early, in the middle, or late, inside contexts of 32K, 64K, 128K and 512K tokens. The evidence stayed the same and only the filler around it grew. ANTMAN, LongAgent and Chain of Agents (CoA) all used GPT-4.1.
| Method | Context | Active workers | Model calls / question | Cost / question | F1 |
|---|---|---|---|---|---|
| LongAgent | 32K | 19.00 | 22.83 | $0.098 | 0.731 |
| LongAgent | 512K | 290.50 | 292.50 | $1.397 | 0.754 |
| Chain of Agents | 32K | 5.10 | 7.10 | $0.081 | 0.750 |
| Chain of Agents | 512K | 78.20 | 80.23 | $1.303 | 0.746 |
| ANTMAN | 32K | 2.57 | 27.47 | $0.077 | 0.775 |
| ANTMAN | 512K | 3.17 | 33.10 | $0.533 | 0.840 |
From 32K to 512K, active workers grew 15.29x for LongAgent, 15.33x for CoA and 1.23x for ANTMAN. Model calls grew 12.81x, 11.30x and 1.21x. Cost grew 14.22x, 16.11x and 6.90x. ANTMAN's cost still rises substantially, because each worker reads and retrieves over larger territories; the claim is about how many agents take part, not that all computation stays flat. Answer quality did not drop as the context grew.
The reverse test matters just as much. With the context fixed at 512K, the authors raised the amount of evidence a question needed from 1 to 4 to 16 pieces. Active workers went from 5.0 to 4.3 to 8.0, model calls from 35.5 to 43.6 to 86.2, and cost from $0.107 to $0.293 per question, while ANTMAN recovered all required evidence and answered every question correctly. The small dip at 4 pieces came from exploration: with only one piece needed, 4.1 of the 5.0 worker activations found nothing relevant. Coordination followed the demand of the question rather than the size of the space.
Does a smaller team give worse answers?
Not in these tests. On standard multi-document question answering (30 questions each from HotpotQA, 2WikiMultiHopQA and MuSiQue, all with GPT-4.1), ANTMAN had the highest average: 0.711 exact match and 0.814 F1, against 0.700 and 0.799 for S2G-RAG, 0.567 and 0.743 for CoA, and 0.433 and 0.616 for LongAgent. S2G-RAG was ahead on 2WikiMultiHopQA.
The larger test is navigation of real structured spaces: RepoProbe-Python (108 questions over eight large Python repositories), an 80-question subset of SWE-QA-Pro, and GAIA-Text-103, the text-only part of the GAIA assistant benchmark, where all methods used the same web search and Python tools.
| Method | RepoProbe-Python | SWE-QA-Pro | GAIA-Text-103 |
|---|---|---|---|
| Direct answer, no search | 31.08 | 55.74 | 20.4 |
| Iterative sparse retrieval | 33.15 | 60.90 | 45.6 |
| ReAct | 25.86 | 64.92 | 34.0 |
| OWL (multi-agent tool use) | – | – | 40.8 |
| ReAct + RepoGraph | 25.71 | 67.38 | – |
| SWE-QA-Pro Agent (built for this benchmark) | – | 77.58 | – |
| ANTMAN-H (Qwen3-8B workers) | 34.10 | 74.60 | 57.3 |
| ANTMAN | 38.21 | 79.78 | 58.3 |
Scores are on a 0-100 scale. Against the strongest baseline not built for the benchmark, ANTMAN was 15.3% higher on RepoProbe-Python, 18.4% on SWE-QA-Pro and 27.9% on GAIA-Text-103 in relative terms. On RepoProbe, the paper checks that this is not just more effort: S2G-RAG used a similar number of model calls (37.12 against 38.13) and tool calls (24.00 against 26.81) and scored 22.87 against 38.21.
The ANTMAN-H row keeps GPT-4.1 as the coordinator and uses the 8-billion-parameter Qwen3-8B for every other component. It kept 89.2%, 93.5% and 98.3% of full ANTMAN's score on the three benchmarks, losing most on the hardest GAIA questions (Level 3: 25.0 against 41.7).
Is it the Need Graph, or just adaptive planning?
Many agent systems replan as they go, so the authors tested whether an explicit list of open needs adds anything beyond that. A "graph-free adaptive" version saw the same question, WorkerCards, evidence and history, and could pick workers and change direction freely, but kept no structured record of what was still unresolved. All versions had the same budget of 100 model calls per question.
| Variant | 512K controlled (F1) | SWE-QA-Pro (40 questions) | GAIA (40 questions, accuracy) |
|---|---|---|---|
| Static plan, never revised | 40.32 | 68.58 | 50.00 |
| Graph-free adaptive replanning | 64.01 | 78.88 | 50.00 |
| Without need revision | 74.44 | 75.32 | 42.50 |
| Without adaptive rerouting | 82.20 | 72.13 | 60.00 |
| Without recovery | 60.12 | 76.52 | 52.50 |
| Full ANTMAN | 84.03 | 81.43 | 60.00 |
At 512K, the graph-free version activated about as many workers as full ANTMAN (3.20 against 3.17) but scored 20 F1 points lower, so the gain is not from engaging more agents. Different parts mattered in different places: recovery mattered most in the long-context test, rerouting in repository navigation, and rerouting had no effect on GAIA, where there is only one territory.
Can multi-agent search avoid the lost-in-the-middle problem?
Using the same paired questions from 32K to 128K, GPT-4.1 reading the whole context showed the classic lost-in-the-middle pattern: its average F1 with the evidence in the middle was 0.181 lower than the mean of the early and late placements (at 32K, 0.590 in the middle against 0.911 early). ANTMAN had no middle penalty (+0.015). Because each worker searches a narrow territory for one need, where the evidence sits in the overall input matters less.
How does this compare with other long-context multi-agent systems?
ANTMAN builds on several lines of work, and its comparisons are with systems that solve related but not identical problems.
- LongAgent (Jun Zhao, Can Zu and colleagues at Fudan University, EMNLP 2024) showed that a leader directing a team of 7B-model members, each holding one chunk, could answer questions over 128K-token documents, and added inter-member communication to resolve conflicting answers caused by hallucination. It is the origin of the Needle-in-a-Haystack PLUS test used here. Its design deliberately keeps chunk size fixed, so the team grows with the input; ANTMAN's results show what that costs at 512K.
- Chain of Agents (Yusen Zhang, Ruoxi Sun and colleagues at Penn State and Google, NeurIPS 2024) has workers read segments in sequence and pass notes forward to a manager, which mitigates long-context focus problems and reported gains of up to 10% over RAG, full-context and multi-agent baselines. It reads the whole input by design, which is a strength for tasks such as summarization where everything is relevant. ANTMAN targets search, where most of the input is not.
- S2G-RAG (Minghan Li, Junjie Zou and colleagues at Soochow University, ACL 2026) is the closest single-agent idea: a trained judge decides whether the evidence so far is sufficient and, if not, writes structured "gap items" that become the next retrieval query. ANTMAN uses a similar notion of open needs but uses it to decide which workers run as well as what to retrieve. S2G-RAG was the strongest baseline on standard multi-hop QA and led ANTMAN on 2WikiMultiHopQA.
- SPD-RAG (Yagiz Can Akay and colleagues, arXiv 2026) assigns one agent per document with a coordinator that dispatches tasks to relevant agents, and reports reaching 58.1 on the LOONG benchmark against 68.0 for a full-context baseline at 38% of its API cost. It shows that per-document agents can be cheaper than reading everything at once; ANTMAN asks whether the number of agents has to follow the number of documents at all. We did not compare the two directly.
- Towards a Science of Scaling Agent Systems (Yubin Kim, Ken Gu and colleagues, Google Research and collaborators, arXiv 2025) ran controlled tests over 260 configurations and found that whether multi-agent coordination helps depends on the task: from +80.8% on decomposable financial reasoning to -70.0% on sequential planning, relative to a single agent. That fits ANTMAN's premise that the amount of coordination should be set by the task, not fixed in advance.
- Scaling Large Language Model-based Multi-Agent Collaboration (Chen Qian and colleagues at Tsinghua University, 2024) found that for collaborative reasoning, performance can keep improving as agents are added, following a logistic curve, with over a thousand agents. That is a different setting: there, more agents add more perspectives on one problem. In search over a large space, ANTMAN's results suggest extra agents mostly add cost when the question has not changed.
- Lost in the Middle (Nelson F. Liu, Percy Liang and colleagues, TACL 2024) documented that models use information at the ends of a long input better than in the middle. ANTMAN's position test reproduces that pattern for GPT-4.1 and shows one way a multi-agent design can sidestep it.
What this does not show
This is an arXiv preprint that has not been peer reviewed, and no code was linked at the time of writing. The test sets are small: the context-scaling result rests on 10 questions at three positions per length, the multi-document QA on 30 questions per benchmark, and the ablations on 40-question subsets, with no confidence intervals reported. With 40 GAIA questions, the 10-point gap in the ablation is four questions.
The scaling test is synthetic. The question stays fixed while filler is added, which isolates the effect of size but is easier than real collections, where more documents can also mean more relevant evidence. ANTMAN is not cheaper at every size: at 32K it made more model calls than CoA (27.47 against 7.10) at about the same cost, and its cost grew 6.90x from 32K to 512K because retrieval and reading still scale with the input. The bound on active workers depends on the number of needs staying small, which the paper argues for but cannot guarantee for every question.
The coordinator is GPT-4.1 throughout, including in ANTMAN-H, so it is open how well the approach works with a weaker or open-weight coordinator. Comparisons were run in the authors' own harness, and some baselines, such as OWL on GAIA, were evaluated only where they fit, so the numbers may differ from those in the baselines' own papers.
Frequently asked questions
How many agents does a multi-agent system need for a long document?
It depends on what the question requires more than on how long the document is. In the ANTMAN paper (arXiv 2609.33326), the same ten questions were asked over 32K to 512K tokens of text, and ANTMAN used about 2.6 to 3.2 active workers per question at every length. Systems that assign one agent per chunk, such as LongAgent, grew from 19 to about 290.
Why does the cost of multi-agent LLM systems grow with context length?
In chunk-based designs, every chunk gets a worker, so a longer input means more workers, more model calls and higher cost even when the question is the same. In the ANTMAN paper, a 16x longer context raised model calls 12.81x for LongAgent and 11.30x for Chain of Agents, against 1.21x for ANTMAN.
Can multi-agent search fix the lost-in-the-middle problem?
It can reduce it in some settings. In the ANTMAN paper, GPT-4.1 reading the full context scored 0.181 F1 lower when the evidence was in the middle than at the ends, while ANTMAN showed no middle penalty (+0.015) on the same questions from 32K to 128K tokens. This was measured on 10 synthetic multi-needle questions, so it is a small test.
Can small models do the work in a multi-agent search system?
Partly. When ANTMAN kept GPT-4.1 as the coordinator and used Qwen3-8B for every other component, it kept 89.2% of full ANTMAN's score on RepoProbe, 93.5% on SWE-QA-Pro and 98.3% on GAIA-Text-103. Most of the GAIA loss came from the hardest Level 3 questions.
Citation
@article{wang2026antman,
title = { ANTMAN: Adaptive Need Tracking for Multi-Agent Navigation in Large Information Spaces },
author = { Wang, Jerry and Jin, Haibo and Yuan, Xiaopeng and Kuang, Peng and Wang, Haohan },
journal = { arXiv preprint arXiv:2609.33326 },
year = { 2026 }
}
Related from our lab
- Agent Primitives: reusable latent building blocks for multi-agent systems
- Should AI agents use the same harness for every task? Choosing agent parts per task
- Why AI agents fail at real-world tasks, and how reusable primitives close the last mile
- RAG that learns over time: source-specific competence for LLM agents
- All DREAM Lab preprints