Multi-agent

Do multi-agent systems get higher scores on SWE-sweep?

Note: some runs are still in progress, so a few points in the figures and tables will be filled in over the coming days. The patterns are already established.

We recently released SWE-sweep (paper, code), a benchmark that gives an agent a repository and challenges it to fix all bugs within that codebase without any hints and without breaking existing tests. The result is graded on a suite of hidden tests.

On SWE-sweep, due to the large scope of each task, the harness used by the agent plays a significant role. Each codebase is thousands of lines long; therefore, performance is limited not only by how capable a model is but also by how much ground it can cover.

Do multi-agent systems find more bugs than a single agent on SWE-sweep, and is it worth what they cost?

There are many ways to implement a multi-agent system. For clarity, we list all of the systems we compare here:

  • Single-agent: a single agent with a bash tool (a stock mini-swe-agent loop; the 1-agent point of the sequential baseline below).
  • Multi-agent:
    • The sequential multi-agent: one agent runs N times in a row. Each run starts from the code the previous run left (it does not see earlier trajectories). Scored on the final cumulative patch.
    • The union multi-agent: N agents run independently (without communication) on the same task with the same directive. Scored as the union of bugs resolved by any of the N runs: a best-case upper bound for independent runs, not a merged patch.‡
    • The agent swarm: N agents work in the same worktree with a method of communication between them.

We introduce mini-swarm, a minimal implementation of the agent swarm. We report results from running several models with mini-swarm on SWE-sweep: Luna 5.6 (xhigh), Sonnet 5.5 (xhigh), Sol 6.1 (xhigh) and Argon (high).

Using mini-swarm, we found that more agents help and that how they work together matters:

One stock agent to a 5-agent swarmAbout twice the bugs for Luna 5.6 and Sonnet 5.5; more for Sol 6.1 and Argon.
Swarm vs union multi-agent, 5 agentsThe swarm resolved more bugs for every model.
Swarm vs sequential multi-agent, 5 agentsClearly ahead for Argon; within rerun noise for Luna 5.6 and Sol 6.1. Sonnet 5.5's sequential runs did better, but took 6–10 hours per repository against the swarm's 2.
Same working time (Luna 5.6, 2 hours)Luna 5.6 baseline agents usually stop within an hour. Given the same 2 hours, 5 independent agents did as well as the 5-agent swarm (22 vs 18.5); at 10 agents only the swarm with compaction pulled clearly ahead (51 vs 26; 33 without).

Despite these gains, SWE-sweep remains a challenging benchmark: the best configuration we ran resolved only 11% of the bugs, and a single broken test can wipe out a repository's result†.

Our setup

mini-swarm implements the agent swarm. It runs N mini-swe-style agents on one shared worktree checkout and lets them coordinate through a shared work queue.

Agents can add tasks to the shared work queue, claim a task before starting to work on it, and mark it done when finished. We do not impose any hierarchy or roles on the agents.

All experiments are run on the following 5 repos: v, pandas, nim, symfony, rails. Swarm runs use 5 agents unless noted (Figures 3 and 4 vary the count), a 2-hour limit and the same first prompt for every model. We also enforced a 1-hour minimum before agents could submit: occasionally a rogue agent would submit very early, so this was an experimental means to reduce noise and give all runs a fair chance. All results mentioned are for Luna 5.6 unless noted otherwise.

Experiments

Naive multi-agent baseline

We first ran our baseline experiments with the sequential multi-agent setup; it resolved 16 bugs at 5 agents and 18 at 10.

  • Sequential
Figure 1. Sequential multi-agent baseline: bugs resolved by N agents run one after another
About this figure

Luna 5.6; 5 repos, 948 bugs; cost, steps and agent-hours are cumulative over the agents

Hover a point for values

We then ran the union multi-agent setup; it resolved 14 bugs at 5 agents and 19 at 10.

  • Sequential
  • Union
Figure 2. Union multi-agent baseline: bugs resolved by any of N independent agents
About this figure

Luna 5.6; 5 repos, 948 bugs; the sequential line from Figure 1 is drawn lighter; cost, steps and agent-hours are cumulative over the agents

Hover a point for values

mini-swarm runs

We then ran the agent swarm in mini-swarm.

As a reminder, a run scores 0 on a repository if its final patch breaks the build or fails a visible test.

  • Sequential
  • Union
  • Swarm, no compaction
Figure 3. mini-swarm without compaction: bugs resolved by N agents in a swarm
About this figure

Luna 5.6; 5 repos, 948 bugs; the lines from Figures 1 and 2 are drawn lighter; a point with several runs is their mean; the 1-agent point is a one-agent swarm

Hover a point for values

The swarm resolved 18.5 bugs at 5 agents and 33 at 10; 20 agents did no better (23.5).

Letting an agent's context grow without limit has a cost: as the run goes on, . To test how much this matters, we reran with compaction. Once the model's context exceeds 100k tokens, it's told to write a summary that becomes its new context (along with the initial system prompt).

  • Sequential
  • Union
  • Swarm, no compaction
  • Swarm, compaction at 100k tokens
Figure 4. mini-swarm with compaction at 100k tokens: bugs resolved by N agents in a swarm
About this figure

Luna 5.6; 5 repos, 948 bugs; same axes as Figure 3, whose lines are drawn lighter; a point with several runs is their mean

Hover a point for values

With compaction the swarm resolved 22.5 bugs at 5 agents and 51 at 10, each for less money. Figure 5 compares tokens and bugs across all models.

Figure 5. Tokens vs bugs resolved for the swarm with compaction, by model
About this figure

The swarm with compaction from Figure 4: one line per model through its 1, 5, 10 and 20-agent runs (where we have them); each point is a configuration's mean over its runs, totals over 5 repos, 948 bugs. Each color is a model; dots mark the data points. Click a point for its details, or a table row to find its point. Token counts depend on each model's tokenizer: the same prompt is about 1.7× more tokens for Sonnet 5.5 than for Luna 5.6 or Sol 6.1. * pandas broke a visible test in at least one run, so its bugs there count 0; click the point for how many were not counted.

Click a point for details, double-click to close · Click a table row to find its point · Use the buttons above to hide or show points

Takeaways

  • More agents find more bugs, but bugs found per dollar falls and returns diminish: each extra agent adds fewer new bugs than the one before.
  • Whether it is worth the cost depends on what you need: per dollar, a single agent is the cheapest way to find a bug for most models, but more agents find more bugs, and a swarm does it in 1–2 hours of wall-clock time where 20 sequential agents took 8–17 hours per repository.
  • Compaction saves money for most models while keeping similar quality*.
  • Cost efficiency scales differently between models: one Luna 5.6 agent resolved 2.37 bugs per dollar against 0.96 for the 10-agent swarm with compaction, while for Argon the swarm was the more efficient (0.39 against 0.08).
  1. At 5 agents, Sol 6.1 gained bugs but cost 39% more, as its cost per step fell only 13% (69–74% for the others). Sonnet 5.5 is the other exception: with compaction it lost 39% of its bugs, all on pandas, and with pandas swapped for dmd and scipy it kept 108% of them for 43% of the cost. ↩

Limitations

  • Few runs. Every configuration has one or two runs, and reruns of the same 5-agent setup differ by up to 10 bugs (1-agent reruns by up to 19). We read the results for their rough scaling, not their exact counts; differences smaller than these spreads are within noise.
  • Five repositories. All runs use the same 5 repositories of SWE-sweep, plus dmd and scipy for one Sonnet 5.5 comparison.

Future direction

As the emphasis on multi-agent systems grows, we hope mini-swarm can serve as a simple, open baseline for them, one that is easy to rerun as models and benchmarks evolve.

Notes on the figures

  • Baselines: a stock mini-swe-agent loop per agent, up to 12 hours each (Sonnet 5.5 and Argon agents also up to $50). Sequential agents start from the previous agent's patch; union agents each start fresh. Cost, steps and hours add up over the N agents.
  • Swarm: N agents on one checkout with a shared work queue, a 2-hour limit, no submitting before 1 hour, and a 30-minute warning. With compaction, an agent whose context passes 100k tokens has its history replaced by its own notes.
  • Different limits: Swarm agents are stopped at 2 hours and cannot submit before 1 hour; baseline agents stop when they decide they are done (at most 12 hours), and the Sonnet 5.5 and Argon baseline agents were also capped at $50 each, which many hit. So part of a difference between the swarm and the baselines may come from time or budget rather than from how the agents work together. For Luna 5.6 we also ran the baselines under the swarm's time limits (the "2 h limit" rows in the table under Figure 2).
  • ‡ Union scoring works like pass@k: a bug counts if any of the N agents fixed it, as if we could pick the right fix. It is a benchmark comparison, not a way to run agents. ↩
  • Runs: each point is one run, or the mean of two where we have two (the tables and tooltips list each run); runs date from 2026-10-29 to 2026-12-02.
  • † pandas is the most fragile repository: a patch that breaks one of its roughly 178,000 visible tests scores 0 there. This happened for three of the four models (16 times for Luna 5.6), wiping out up to 44 resolved bugs at once. ↩
  • Hung grades: two baseline patches made the visible tests hang past the grader's 90-minute limit; we count them as failing.

Additional tables

These tables expand on the figures; click a title to open it.

Cost of every configuration

Totals over the 5 repositories; points with two runs show the mean. Sequential and union costs are cumulative over the N agents. Bugs per dollar is bugs resolved divided by cost.

ModelSystemAgentsBugsCostBugs per $Agent-hours
Luna 5.6Sequential110$4.222.371.7
Luna 5.6Sequential516$10.521.525.8
Luna 5.6Sequential1018$18.350.9811.3
Luna 5.6Sequential2021$36.320.5845.1
Luna 5.6Union16$3.671.632.7
Luna 5.6Union514$18.720.7514.7
Luna 5.6Union1019$36.450.5229.5
Luna 5.6Union2035$78.670.44101.6
Luna 5.6Sequential, 2 h limit19$13.200.684.6
Luna 5.6Sequential, 2 h limit522$59.960.3725.5
Luna 5.6Sequential, 2 h limit1026$116.610.2250.0
Luna 5.6Union, 2 h limit18$10.330.775.1
Luna 5.6Union, 2 h limit522$58.330.3826.0
Luna 5.6Union, 2 h limit1026$124.560.2150.7
Luna 5.6Swarm, no compaction15$12.080.415.1
Luna 5.6Swarm, no compaction518.5$39.340.4725.5
Luna 5.6Swarm, no compaction1033$70.000.4751.6
Luna 5.6Swarm, no compaction2023.5$77.060.30104.8
Luna 5.6Swarm, compaction at 100k tokens112$7.041.705.7
Luna 5.6Swarm, compaction at 100k tokens522.5$25.600.8831.3
Luna 5.6Swarm, compaction at 100k tokens1051$53.230.9655.2
Luna 5.6Swarm, compaction at 100k tokens2052$77.230.67112.5
Sonnet 5.5Sequential136$238.980.1511.8
Sonnet 5.5Sequential583$981.410.0840.6
Sonnet 5.5Sequential10104$1,880.440.0674.8
Sonnet 5.5Union131$212.750.159.0
Sonnet 5.5Union562$1,148.180.0549.1
Sonnet 5.5Union1085$2,263.820.0499.3
Sonnet 5.5Swarm, no compaction122.5$175.030.137.9
Sonnet 5.5Swarm, no compaction570.5$786.170.0935.0
Sonnet 5.5Swarm, compaction at 100k tokens124$71.950.337.4
Sonnet 5.5Swarm, compaction at 100k tokens543$349.040.1236.8
Sol 6.1Sequential111$6.611.672.3
Sol 6.1Sequential546$38.401.2011.3
Sol 6.1Sequential1064$79.580.8024.8
Sol 6.1Sequential2090$155.030.5860.5
Sol 6.1Union111$7.521.462.4
Sol 6.1Union534$38.190.8912.1
Sol 6.1Union1042$75.970.5523.5
Sol 6.1Union2051$153.720.3372.5
Sol 6.1Swarm, no compaction113.5$11.731.156.2
Sol 6.1Swarm, no compaction542.5$49.320.8628.6
Sol 6.1Swarm, no compaction1052$118.700.4460.5
Sol 6.1Swarm, no compaction2086$180.950.48111.7
Sol 6.1Swarm, compaction at 100k tokens17$7.940.884.1
Sol 6.1Swarm, compaction at 100k tokens547$68.600.6930.6
Sol 6.1Swarm, compaction at 100k tokens1067$94.040.7152.4
Sol 6.1Swarm, compaction at 100k tokens2091$170.890.53106.3
ArgonSequential113$171.780.0813.5
ArgonSequential540$659.110.0652.2
ArgonSequential1041$1,184.290.0397.7
ArgonUnion118$191.140.0912.7
ArgonUnion564$922.530.0764.5
ArgonUnion1094$1,827.340.05128.8
ArgonSwarm, no compaction131$57.690.547.6
ArgonSwarm, no compaction573$341.840.2133.7
ArgonSwarm, no compaction1055$578.530.1058.1
ArgonSwarm, compaction at 100k tokens119$33.530.577.9
ArgonSwarm, compaction at 100k tokens576$175.800.4337.3
ArgonSwarm, compaction at 100k tokens1093$238.800.3969.4
Results without pandas

pandas is the most brittle repository: a single broken visible test zeroes it, and it carries a large share of some models' bugs. Bugs resolved over all 5 repositories and over the four without pandas (720 bugs).

ModelSystemAgentsAll 5 repospandasWithout pandas
Luna 5.6Sequential110010
Luna 5.6Sequential516214
Luna 5.6Sequential1018216
Luna 5.6Sequential2021318
Luna 5.6Union1615
Luna 5.6Union514410
Luna 5.6Union1019415
Luna 5.6Union2035827
Luna 5.6Swarm, no compaction1505
Luna 5.6Swarm, no compaction518.53.515
Luna 5.6Swarm, no compaction1033429
Luna 5.6Swarm, no compaction2023.5023.5
Luna 5.6Swarm, compaction at 100k tokens1121.510.5
Luna 5.6Swarm, compaction at 100k tokens522.5022.5
Luna 5.6Swarm, compaction at 100k tokens10511041
Luna 5.6Swarm, compaction at 100k tokens20527.544.5
Sonnet 5.5Sequential1362115
Sonnet 5.5Sequential5835924
Sonnet 5.5Sequential101046935
Sonnet 5.5Union1312011
Sonnet 5.5Union5623923
Sonnet 5.5Union10855431
Sonnet 5.5Swarm, no compaction122.512.510
Sonnet 5.5Swarm, no compaction570.545.525
Sonnet 5.5Swarm, compaction at 100k tokens124816
Sonnet 5.5Swarm, compaction at 100k tokens5431726
Sol 6.1Sequential11129
Sol 6.1Sequential546244
Sol 6.1Sequential10641054
Sol 6.1Sequential20902367
Sol 6.1Union11138
Sol 6.1Union534628
Sol 6.1Union10421131
Sol 6.1Union20511536
Sol 6.1Swarm, no compaction113.51.512
Sol 6.1Swarm, no compaction542.5834.5
Sol 6.1Swarm, no compaction1052052
Sol 6.1Swarm, no compaction20862462
Sol 6.1Swarm, compaction at 100k tokens1716
Sol 6.1Swarm, compaction at 100k tokens547542
Sol 6.1Swarm, compaction at 100k tokens10671552
Sol 6.1Swarm, compaction at 100k tokens20912368
ArgonSequential11349
ArgonSequential540436
ArgonSequential10411229
ArgonUnion118810
ArgonUnion5642242
ArgonUnion10943856
ArgonSwarm, no compaction131526
ArgonSwarm, no compaction5732350
ArgonSwarm, no compaction1055055
ArgonSwarm, compaction at 100k tokens119316
ArgonSwarm, compaction at 100k tokens5762452
ArgonSwarm, compaction at 100k tokens10932964
Union averaged over every choice of agents

Figure 2 scores the union of agents 1 to k in the order they ran. Averaging over every possible set of k of the agents we ran (10 or 20 per repository), as pass@k does, removes the dependence on that order.

Model1 agent: in orderaveraged2 agents: in orderaveraged5 agents: in orderaveraged10 agents: in orderaveraged
Luna 5.665.2118.71415.91924.3
Sonnet 5.53129.64744.86268.48585.0
Sol 6.11115.32523.63435.94243.9
Argon1823.22637.36464.69494.0
Results per repository

Bugs resolved per repository; where the visible-test/build penalty zeroed a repository, the bugs found before the penalty are in parentheses. Points with two runs show the mean.

ModelSystemAgentsvpandasnimsymfonyrailsTotal
Luna 5.6Sequential14040210
Luna 5.6Sequential56260216
Luna 5.6Sequential106262218
Luna 5.6Sequential207372221
Luna 5.6Union1212106
Luna 5.6Union53442114
Luna 5.6Union106442319
Luna 5.6Union20138 (9)73435
Luna 5.6Swarm, no compaction12 (2.5)02105
Luna 5.6Swarm, no compaction54.53.53.53418.5
Luna 5.6Swarm, no compaction10114 (7.5)7.54.5633
Luna 5.6Swarm, no compaction205 (8)0 (9.5)44.51023.5
Luna 5.6Swarm, compaction at 100k tokens17.51.51.50.5112
Luna 5.6Swarm, compaction at 100k tokens5110 (9)5.52.53.522.5
Luna 5.6Swarm, compaction at 100k tokens1012.510 (17)7.514751
Luna 5.6Swarm, compaction at 100k tokens2016.57.5 (10.5)39.515.552
Sonnet 5.5Sequential182170036
Sonnet 5.5Sequential51259110183
Sonnet 5.5Sequential1017691404104
Sonnet 5.5Union172030131
Sonnet 5.5Union5133990162
Sonnet 5.5Union101554110585
Sonnet 5.5Swarm, no compaction1712.52.50.5022.5
Sonnet 5.5Swarm, no compaction51645.560370.5
Sonnet 5.5Swarm, compaction at 100k tokens112810324
Sonnet 5.5Swarm, compaction at 100k tokens5151770443
Sol 6.1Sequential12231311
Sol 6.1Sequential51121261546
Sol 6.1Sequential1016101271964
Sol 6.1Sequential20172314102690
Sol 6.1Union10321511
Sol 6.1Union5106621034
Sol 6.1Union101111731042
Sol 6.1Union201315841151
Sol 6.1Swarm, no compaction13.51.540.5413.5
Sol 6.1Swarm, no compaction51486.55942.5
Sol 6.1Swarm, no compaction10190 (22)10101352
Sol 6.1Swarm, no compaction20212410131886
Sol 6.1Swarm, compaction at 100k tokens1111137
Sol 6.1Swarm, compaction at 100k tokens518.55869.547
Sol 6.1Swarm, compaction at 100k tokens1023151081167
Sol 6.1Swarm, compaction at 100k tokens20212312171891
ArgonSequential19400013
ArgonSequential5134901440
ArgonSequential101412011441
ArgonUnion110800018
ArgonUnion51822 (28)861064
ArgonUnion101938 (41)9111794
ArgonSwarm, no compaction112.55823.531
ArgonSwarm, no compaction515.52312.561673
ArgonSwarm, no compaction10180 (29)1291655
ArgonSwarm, compaction at 100k tokens110320419
ArgonSwarm, compaction at 100k tokens516241281676
ArgonSwarm, compaction at 100k tokens10222917101593