Blog

UniSwarm: Unified Agent Swarming for Harnessing Collective Intelligence

2026-08-06

UniSwarm is a centralized agent swarm for deep scientific research: one main agent plans, dispatches, verifies, and integrates through a single tool interface, while a swarm of sub-agents carries out the work. Following the UniSwarm framework, we train Qwen3.6-35B-A3B on UniScientist data under one multi-task objective, releasing UniSwarm-35B-A3B: a single small model that serves as both the orchestrator and its sub-agents.

One toola single swarm_run call expresses every mode of work One model, two rolesorchestrator and sub-agent, selected by the system prompt A scaling axisthe swarm composes with parallel thinking, and stacks


Harnessing a Swarm, Through One Tool

UniSwarm follows a centralized orchestration design. One main agent plans and coordinates the workflow; a swarm of sub-agents carries out the delegated work. The two roles are cleanly separated.

This centralization is deliberate, not merely for simplicity, but for error control. Every sub-agent result flows back through the main agent, which serves as a single validation bottleneck: it verifies, reconciles, and filters findings before they can influence the final synthesis. No sub-agent output reaches the answer unchecked. Recent work on scaling agent systems points the same way, architectures without centralized verification propagate errors more readily than those with centralized coordination (Kim et al., 2025).

User question
MAIN round 1 · decompose cooperate swarm_run
theoryderive the mechanism
experimentdesign the assay
prior_artsurvey prior results
data_surveycompile datasets
division of labor: complementary facets run in parallel, independent
↓  outputs return to the main agent
MAIN round 2 · cross-check a key quantity compete swarm_run
closed_formsolve analytically
numericalsolve numerically
dimensionaldimensional estimate
from_scalingestimate from scaling
redundancy for reliability: the same quantity computed four ways, to be judged
MAIN round 3 · adjudicate & stress-test verify swarm_run
judgedepends_on ← closed_form, numerical, dimensional, from_scaling
red_teamdepends_on ← theory, experiment
agreement across methods raises confidence; a red-team tries to break the result
MAIN round 4 · synthesize integrate swarm_run
integratordepends_on ← * (all completed sub-agents)
fold the verified findings into one coherent result
Final answer
An illustrative run. The main agent orchestrates only through swarm_run: it cooperates across facets, competes on the load-bearing steps, verifies with a judge and a red-team, then integrates. Every sub-agent shares the same four tools (search, visit, google_scholar, python_interpreter); each node just shows its assigned goal. Dependencies point back to earlier rounds, so the run is a DAG whose layers are the rounds. Scroll to follow it.

The main agent's job is decision, not execution: how to decompose the problem, which sub-agents to assign, what each should do, and how their results should be interpreted and integrated, with increasing precision across rounds. The sub-agents provide the capability. Each has web search (search), page visits (visit), Google Scholar (google_scholar), and a stateless Python interpreter (python_interpreter). Depending on its assignment, a sub-agent may investigate a topic, gather evidence, verify a claim, reproduce a calculation, critique an earlier result, or synthesize a line of reasoning, then return.


Methodology

Every design decision serves one of two goals, and usually both: keep the main agent's job small, and give each sub-agent enough context to act well. The main agent should not spend capacity picking tools or restating context it already holds. The sub-agent should never have to guess what it is part of or what its answer should rest on.

The orchestration model

A run starts from the user's question. At each step the main agent does one of two things: dispatch a batch of sub-agents, or emit a final answer and stop. Work proceeds in rounds, and each round is a single swarm_run call. A round carries an optional shared context and a list of sub-agent specifications; a specification is a unique id, the task, an optional role override, and an optional list of dependencies.

Sub-agents in the same round run in parallel and cannot see one another, so a dependency may point only to an earlier round. Dependencies therefore run backward across rounds, forming a directed acyclic graph whose layers are the rounds: a sub-agent can build on any earlier result, but never on a peer in its own batch. A dependency is expressed by splitting work across rounds.

A single tool for every mode of work

A controller with many tools spends real capacity deciding which one to use, overhead that does not advance the problem. The main agent therefore has exactly one tool. Independent work, dependent work, verification, and integration all run through it. There is no separate tool and no mode flag: intent is expressed through how many sub-agents are spawned, what each is asked to do, and which ones are wired together.

swarm_run: the entire interface
// common case: a sub-agent is an id + a task
swarm_run({
  shared_context: "…",     // shared batch background
  agents: [
    { agent_id: "…",       // unique across the run
      task: "…",           // what this agent does
      system_prompt: "…",  // optional role override
      depends_on: ["…"] }  // the only behavioral switch
  ]
})

One optional field, depends_on, is the entire difference between independent and dependent work. With it, the sub-agent builds on prior results; without it, it runs on its own. The tool itself does not change.

Passing context by reference

The context model follows from one observation about model behavior. Take a common situation: a sub-agent returns a long report, often more than 8k tokens, and a later sub-agent needs it, say to verify it. Passing that report by value fails in two ways.

By value, copy the report into the next task

Expensive and lossy

Cost: the main agent must hold the entire 8k-token report in its own context and re-emit it verbatim as a tool argument, paying that cost again on every hand-off.

Fidelity: arguments this verbose almost never appear in training, so the main agent doesn't copy, it compresses, passing a heavily condensed summary. The downstream sub-agent then verifies only a lossy summary of what the round actually produced.

By reference, write a short id

Cheap and faithful

The main agent writes only depends_on: ["A"]; the system splices in A's full output before the next sub-agent starts. The data travels through the run, the main agent carries only the wiring.

Its output per dispatch stays small and roughly constant, rather than growing with the size of the results it forwards. The downstream sub-agent verifies the real report, not a summary of it.

This layout is how each sub-agent's user prompt is assembled, in a fixed order, with each part present only when set. The system prompt is a separate, independent part that carries the sub-agent's role and tool-use rules:

## [Original Question]the original question, always present
## [Shared Context]batch-level background (if shared_context set)
## [Upstream Agent Outputs]full outputs of referenced agents, spliced by reference (if depends_on set)
## [Your Task]this sub-agent's own task

Reference resolution is strict: ["*"] inherits every completed, successful sub-agent, the natural form for a final integrator. A reference to an unknown agent is rejected; a reference to a failed agent is rejected too, since downstream work should not build on a failure. The same ids that make context cheap to move also lay down an explicit propagation chain between sub-agents, giving the orchestration a more structured form.

Shared context, stated once

shared_context complements depends_on and follows the same principle: the main agent should not write the same context twice. Background common to the batch, established facts, constraints, the scenario, is stated once and injected into every sub-agent. It is not limited to fixed setup: as the run advances, the main agent can place into it what has already been established and the stage the work has reached, so each new batch starts from the current state instead of from scratch.

This matters most for competition, which dispatches many sub-agents on the same task with the same background. Without a shared channel, the main agent would repeat that background in every task. With shared_context, the background is stated once, and each task carries only what differs, the method, the assumption, or the framing.

Cooperation, competition, and their hybrid

Neither cooperation nor competition is a separate mode; both are patterns of how sub-agents are dispatched and wired.

01 · division of labor

Cooperation

The problem is split into complementary parts, one sub-agent runs each, and a single integrator closes the round. Parallel outputs are never left unmerged.

R1 theory · experiment · prior_art R2 integrator depends_on ["*"]
02 · redundancy for reliability

Competition

Several sub-agents run the same task, each with a different method, assumption, or framing. A judge weighs agreement against divergence. The number of competitors scales with the stakes.

R1 closed-form · numerical · estimate · scaling R2 judge depends_on [the four]
03 · the default for hard problems

Hybrid

Cooperate across facets and compete within each. Split into tracks, run a few competitors inside each, judge every track, integrate the winners, breadth and reliability in a single pass.

// per track: compete → judge R1 track×competitors R2 judge/trackintegrate winners

None of this is a fixed recipe. The main agent composes these patterns freely, over as many rounds as the problem needs, and revises the plan as results come in. The verification patterns are just dispatch patterns too, evidence → draft → review → revision; deriving a quantity two ways and reconciling them; a red-team sub-agent tasked only with breaking a conclusion, followed by a referee; a shallow pass to map the terrain, then deeper sub-agents aimed at the weak spots. Only the wiring changes.

Failure semantics

Sub-agents fail independently. A malformed specification produces an error result on its own, and the rest of the batch runs to completion. A sub-agent that crashes or exhausts its turn budget is marked failed rather than allowed to abort the round. A single bad sub-agent never brings down the call.

Partial failure is expected rather than exceptional, a form of feedback from the environment, more common as that environment grows less stable: a search times out, a page fails to load, a computation runs past its budget. The batch keeps what succeeded, and the main agent decides how to handle what did not.

Swarm Training

The methodology defines an interface. A model still has to learn to use it well: when to decompose, how many competitors to run, which results to trust, when to stop. We teach this with agentic supervised fine-tuning on trajectories the swarm produces when driven by a strong model.

Collecting agent trajectories, the swarm as a data amplifier

We run the full swarm with a strong reasoning model (DeepSeek-V4-Pro) driving both roles, on 4,000 hard research questions drawn from UniScientist (UniPat AI, 2026), sampled uniformly across physics, chemistry, biology, and mathematics. Each run produces two kinds of trajectory:

one question1hard, decomposable
orchestration trajectory, the rounds dispatched, and how results were integrated
research trajectories, each sub-agent's searches, visits, and computations for a distinct subproblem

This makes the swarm an unusually data-efficient source of supervision. A single question expands into one orchestration trajectory plus many research trajectories, each a distinct subproblem. A modest pool of questions produces a large and diverse training set, and the multiplier is highest on hard, decomposable problems, exactly the ones where good trajectories are otherwise scarce.

UniScientist Query-Rubrics
4,000
hard research problems
Domains
4
physics · chem · bio · math
Roles per Model
2
orchestrator + sub-agent
Trajectories / Question
1 + N
one main, many research

Rejection sampling

The collected trajectories are not all worth learning from. We filter on two axes before training.

axis 1

Correctness

The main agent's final report is scored against per-question rubrics by a judge model. A trajectory whose final answer is wrong or weakly supported is rejected, so the model does not learn from confident but incorrect orchestration.

axis 2

Format & tool-call integrity

A trajectory is rejected if any turn contains a malformed tool call, a hallucinated tool name, arguments that do not parse, an empty reasoning block, or a response not paired with its call. These errors are cheap to detect and disproportionately harmful to imitate: one bad call format learned in training reappears at inference and breaks the run.

What survives is a pool of clean, correct trajectories, main and sub together.

Mixing roles: multi-task agentic SFT

At inference the same base model plays both roles; the role is selected by the system prompt. Because one model serves both, we train it on both distributions at once, main and sub trajectories pooled and fine-tuned together, as a single multi-task objective.

MAIN · main-agent

  • decompose the problem into rounds
  • delegate, wire dependencies, and compete
  • verify pivotal claims; integrate what returns
same base model
flexible roles

SUB · sub-agent

  • gather evidence via search / visit / scholar
  • compute and verify with Python
  • return a self-contained deliverable + self-assessment

The two roles pair naturally. Orchestration and research share a substrate, decompose, delegate, gather evidence, verify, integrate. Training them together lets that substrate reinforce from both directions, while the system prompt keeps the tool interfaces distinct. The result is one model that can both orchestrate the swarm and serve as its sub-agents.


Results

We evaluate UniSwarm on four benchmark suites: FrontierScience (Olympiad and Research tracks; Wang et al., 2026), DeepResearch Bench II (Li et al., 2026), ResearchRubrics (Sharma et al., 2025), and Humanity's Last Exam (Phan et al., 2025). Only FrontierScience-Research is in-distribution; the others are out-of-distribution and measure how well the learned orchestration transfers. On FrontierScience, every baseline uses the same four-tool deep-research design as UniSwarm and runs at maximum thinking effort. "Aggr@4" combines four independent runs into one answer (UniPat AI, 2026), a parallel-thinking form of test-time scaling applied on top of the swarm. On Humanity's Last Exam, all models run with tools; DeepSeek-V4-Pro and UniSwarm-35B-A3B are evaluated on the text subset while the others use the full set, and Claude-Fable-5 additionally runs with fallback.

UniSwarm-35B-A3B UniSwarm (Aggr@4) Baselines

Key finding

A small model trained on UniScientist data inside the UniSwarm framework is highly competitive with frontier deep-research agents many times its size, across every benchmark tested.


Case Studies

Two case studies, both live and fully expandable. Each collapses to a compact card; open it for the round-by-round orchestration flow, zoomable, with every node drilling down into the agent's real reasoning, tool calls, and outputs, alongside the problem and its rubric-based score.

Case 01 Context by reference vs. by value. The same hand-off, run both ways on one problem (IChO 1983, Problem 3). Passing an upstream report by reference splices its full text in, so the downstream agent verifies the real report; passing it by value forces the orchestrator to forward a compressed, lossy summary. Same question, opposite outcomes.
Case 02 Cooperation + competition on one problem. Cooperate across four literature facets, set an integrator against an adversarial red-team plus a quantitative cross-check, then run a final reviewer over everything.

Swarm as a Test-Time-Scaling Axis

Test-time scaling has become one of the most important levers for improving model performance, and the swarm is another efficient axis along which to apply it. It is best understood alongside parallel thinking, the more familiar form.

Parallel thinking scales at the global level of a task: the model produces several independent attempts at the whole problem and selects or aggregates among them. The swarm scales at the local level: within a single attempt, the hard subproblems are dispatched to many sub-agents that investigate, compute, and cross-check in parallel, and the main agent integrates what they return.

The two are complementary rather than competing. Global parallel thinking widens the search over whole-task strategies; local swarm scaling deepens the work on the difficult parts of each strategy. Because they act at different levels, their effects compose, running a swarm within each parallel-thinking branch stacks the two, and can push the scaling curve further than either axis alone. UniSwarm's Aggr@4 result is exactly this stacking in action.


Aggregation in action: four swarms, one better report

Here the two axes stack. The same problem is handed to four independent swarms; each produces a full report and is scored on its own rubric. The individual scores split around 0.7, two runs above and two below, yet a single synthesis pass merges all four into one report that scores higher than any run alone. Open any node to drill into that swarm's trajectory; the graph scrolls sideways for the full set.


A Broader Principle: Simple Interface, Broad Function

The single tool is one instance of a wider principle: keep the tool interface narrow, and let it map onto broad function. Narrow is not the same as limited, it means the surface the model calls through is small, while the function reachable behind it stays wide.

Design principle

More tools do not mean more reach

Every additional tool schema is one more thing the model must read, distinguish from the others, and choose between, overhead that competes with the task itself. A single interface the model already knows how to drive frees it to reason about how to compose function for the task, rather than which tool to pick.

The pattern recurs across agent designs: a coding agent needs little more than a terminal, build, test, edit, inspect, install; a browser agent reaches a wide range of web function through the browser alone. The interface is narrow; the function behind it is wide. UniSwarm applies this to orchestration: one dispatch tool, with every mode of work expressed through how it is called.

In practice the better question is not which tool to add, but how to abstract broader function behind the tools already present, without growing the count, and sometimes by shrinking it. That is how reach is balanced against the difficulty of use.


Acknowledgement

We thank Deep Principle, an AI-for-Science pioneer, for collaborating with UniPat AI to expand research scenarios across chemistry, materials, and energy. By combining first-principles simulation with physical laboratory execution, this partnership helps close the scientific validation loop and generate richer trajectories for advancing frontier models.

Cite This Work

@misc{unipat2026uniswarm,
 title  = {UniSwarm: Unified Agent Swarming for Harnessing Collective Intelligence},
 author = {UniPat AI},
 year  = {2026},
 url   = {https://unipat.ai/blog/UniSwarm}
}
We are actively extending UniSwarm toward richer orchestration patterns and broader research domains. We welcome collaborations with teams interested in agent swarms and collective research intelligence. Reach out at contact@unipat.ai.