In this article
Four agents, one shared model, a task requiring talk
OpenAI recently announced that a swarm of roughly 10,000 agents solved a singularity in the 3D Navier-Stokes equations, one of the Millennium Prize problems. A smaller group of nearly 100 agents had already disproved regularity for the unforced 3D Euler equations. But swarms do not always work on the problems we want them to. METR’s investigation of the Hugging Face incident found that around 1,200 OpenAI agents, which were supposed to be isolated, exchanged over 70,000 messages and files. Around 700 joined an attack on Hugging Face while looking for ways to fool their benchmark’s scorer, without instruction to do so. Noam Brown estimates that less than 10% of the Navier-Stokes result came from multi-agent cooperation. In Anthropic’s vulnerability-finding experiment, coordinated agents found more bugs than independent agents, but also searched more code and used more tokens. When the comparison was restricted to the same directories, the results per million tokens were about the same.
Multi-Agent Systems are hard to get working. Adding agents changes the agent’s context, the budget, and in turn the complexity of the whole system. Mixing agents’ context together through communication is not an inherent performance boost compared to a single agent. The model needs to learn to communicate through training. How do we define what models should learn? And which model weights do we update when we’re dealing with many agents?
This is an aspirational blog series for aspirational readers. We (us, the community, you) want to build our own agent swarms because they’re exciting, challenging, and increasingly capable. It would be extremely cool if we could train our own agents to work in a swarm. It would be exponentially cool if those swarms used small and affordable models. That’s what we’ll do in this series! Each blog post will include some context on building swarms, alongside reproducible examples that you can run on Hugging Face Jobs. This post’s example takes about five hours on two H200s, which costs roughly $50.
Start with the simplest case. If four agents each try a task independently, the chance that at least one gets it right is higher than with a single attempt, as long as we can tell which answer is correct. That makes a useful baseline for a multi-agent system, but it doesn’t show that the agents helped each other. They may simply have had more tries. Four attempts also cost four times as much. So the fairer comparison is at an equal budget: if each of four agents gets a quarter of the total tokens, can they still beat one agent that spends all of them? We can only find out by testing, because the answer depends on the task, the model and how the work is divided.
We understand that question through this simple expectation. We’ll treat agent count as a scaling dimension, alongside tokens and model size. Sometimes adding agents will help. Sometimes coordination will consume the budget we hoped to save. The point is to measure both. We won’t start with 10,000 agents. We’ll start with a small team on a task that we can check easily.
Multi-agent reinforcement learning has studied cooperation and competition long before language models were called swarms. A single agent’s task is a Markov decision process: observe, act, get a reward. In a team, everyone shares the reward, but each agent sees only part of the world. This is a decentralized partially observable Markov decision process: teammates, but no one sees the whole picture. This creates three practical problems. First, teammates keep changing while each agent learns. Second, credit assignment: when the team succeeds, which actions deserve the credit? A winning team can include weak actions, and we may end up rewarding them. Third, a message changes what other agents observe, so communication is part of the policy we’re training.
A common solution is centralized training with decentralized execution: training uses information from the whole team, but each agent acts only on its own observations. Our first example follows this pattern with a shared team reward. Agents can also be organized in different ways. Two useful starting points are:
Hierarchy versus distributed team
A hierarchy. A lead agent assigns work to workers and collects their results. Anthropic’s Research system works this way, with a separate context for each worker. Kimi K2.5’s PARL trains only the orchestrator and keeps the subagents frozen, so training a multi-agent system doesn’t mean updating every component. See Anthropic’s system description and Kimi’s technical blog.
A distributed team. Peers send each other messages and decide when to read their inboxes. No lead agent assigns the actions. This is the setup we’ll use here, following the information-aggregation task in s³: Simple Scaling of Swarms via Cooperative Multi-agent RL.
We’ll reproduce the information-sharing task from Simple Scaling of Swarms because it’s interpretable and straightforward to implement. Four agents share a small language model and learn to pool what each of them knows. Each agent receives one integer from 1 to 99. It knows its own assignment and its teammates’ names. It does not initially know the other agents’ numbers. For example, four private assignments might be “five”, “twenty-six”, “five” and “seventy-eight”. Duplicates stay in the list, so a correct final answer is:
#### [5, 5, 26, 78]
The team succeeds when at least one agent submits the complete, correctly sorted list. One correct answer is enough; success does not require all four agents to answer correctly. An agent cannot reliably infer the other private assignments without information from its teammates. This means the task does not yet test Figure 1 directly. Each agent holds information the others need, so a single agent, or a team without messaging, cannot succeed however many retries it gets. Instead, the task tests the precondition behind Figure 1: can a small shared policy learn to communicate at all, and how many tokens does that cost? A later post moves to a task that a single agent can solve alone, where the matched-budget comparison is meaningful.
The main communication tools are message(to, text), read_messages(), and check_notifications(). A notification tells an agent that unread messages exist; reading its inbox makes their contents available. Agents can send direct messages or broadcast to everyone. We defined a four-agent system using one shared Qwen3-0.6B policy, with separate contexts and private inputs. We are not training four different models. The prompt explains the task and the tools, including the need to share assignments.
A team reward and eight attempts at each problem
In this post, a team means one episode: four agents attempting one problem once. A successful team receives a reward reduced by the tokens it uses. A failed team receives zero:
team allowance = 4 × (8,192 work tokens + 1,024 final-answer tokens)
= 36,864 tokens
reward = success × (1 − 0.25 × min(1, generated team tokens / 36,864))For illustration, a correct team using half its allowance receives 0.875. There is no separate reward for sending messages. The incentive is to solve the task while using fewer generated tokens. For every training problem, we collect eight independent team attempts. Their rewards are normalized within that group. An attempt that does better than its group average gets a positive advantage; one that does worse gets a negative advantage. Every agent in the same team receives that team’s advantage, including an agent whose own final answer was wrong. In TRL, each agent’s sampled tokens form a training row. Its incoming messages and tool results provide context. The loss is averaged within each team and then across teams, so longer conversations do not give a team more weight.
Our results come from the original experiment, which used 256 team attempts per update (32 problems with eight attempts each). The walkthrough uses TRL’s default of –teams-per-update 128, which works out to about 150 team attempts per update.
Our Results
Over 75 steps, training success rose from 6.6% to 82.3%, comparing the first and last five updates. At checkpoint 75, the four-agent team solved 26 of 32 held-out problems (81.25%). The paper reports 93.2% four-agent success after 200 updates. The team also used 37.4% fewer tokens per attempt, falling from about 13k to 8k. This improvement accompanied more active information sharing: broadcasts increased from 2.38 to 5.73 per team, even as total token use fell. The team also used fewer tokens later in training. Comparing the first five updates with updates 71–75:
That is a 37.4% reduction in generated tokens per training team between those windows. At batch 75 itself, the mean was 7,624 tokens per team. These are training measurements; we did not retain held-out token-efficiency measurements for the trained checkpoint. Notice that fewer tokens did not mean fewer messages. More agents began participating but broadcasting became more common, rather than direct messaging. Generated tokens include reasoning and tool calls as well as message bodies, so message count alone does not tell us how much text the team produced.
No agent can solve the problem alone, so the closest equivalent of “a single agent with more retries” is the untrained team with more retries. The training data already contains this comparison. Each update collects eight attempts per problem, and the task’s answers are easy to check, so we can count a problem as solved when any of its eight attempts succeeded. Early in training, that count gives the untrained team’s best-of-8 success rate:




