Hugging Face says four small AI agents learned to team up

In short

6.56% → 82.34% team success, updates 1–5 vs 71–75; 26 of 32 held-out problems solved at checkpoint 75; 37.4% fewer tokens per team attempt; 37.5% untrained team's success with eight tries

The question behind it

The post, by Ben Burtenshaw and Kashif Rasul of Hugging Face, is part 1 of a series on building and training multi-agent systems, or "swarms". It starts from a sceptical point: a big swarm is not, by itself, evidence that cooperation helped. If four agents each try a task on their own, the chance that one of them gets it right is higher than with one attempt, but that may just be more tries, at four times the cost. As one example, the post cites an estimate by Noam Brown that less than 10% of a recent swarm result in mathematics came from multi-agent cooperation.

The series asks whether communication actually helps or just spends more compute. This first post tests a precondition: can a small shared model learn to communicate at all, and at what token cost?

The task: four agents, four secret numbers

The setup reproduces the information-sharing task from a recent paper, s³: Simple Scaling of Swarms via Cooperative Multi-agent RL. Each agent gets one integer from 1 to 99. It knows its own number and its teammates' names, but not their numbers. The team wins if at least one agent submits the complete list, duplicates included, in sorted order. With private numbers 5, 26, 5 and 78, the right answer is [5, 5, 26, 78].

Agents talk through tools: message(to, text) sends to one teammate or broadcasts to all, read_messages() opens the inbox, and check_notifications() says whether unread messages are waiting. All four agents run the same Qwen3-0.6B policy with separate contexts; the authors stress they are not training four different models.

Because each agent holds a number the others need, no single agent and no team without messaging can solve this, however many retries it gets. The post says a later part will move to a task one agent can solve alone, where a matched-budget comparison is meaningful.

How the training works

The plain-English framing here is ours; the rules are from the post.

The team is scored as one unit. A failed team gets zero. A successful team gets a reward that shrinks slightly with the tokens it used, out of an allowance of 36,864 tokens (four agents × 8,192 work tokens plus 1,024 for the final answer). A correct team that uses half its allowance scores 0.875. There is no separate reward for sending messages.

For each training problem the system runs eight independent team attempts and compares them with each other. Attempts that beat the group average are reinforced and the rest are discouraged, and every agent in a team gets that team's score, even an agent whose own answer was wrong. Behaviour that separates winning teams from losing ones is what gets learned, so nobody has to decide which agent deserved the credit.

The original run used 256 team attempts per update (32 problems × 8 attempts), with one H200 GPU training and seven generating the conversations.

What changed over 75 updates

The table compares the averages of the first five and last five training updates, as the post reports them.

Fewer tokens did not mean fewer messages. The agents shifted towards broadcasting rather than direct messages, and the authors note that the tokens counted include reasoning and tool calls, not only message text. At update 75 the team was solving most problems but, in the authors' words, "has not converged to the cleanest communication pattern" of one broadcast per agent.

On held-out problems the checkpoint at update 75 solved 26 of 32 (81.25%). The s³ paper ran the same task for 200 updates and reports 93% four-agent success on held-out problems, averaged over six evaluation seeds (the blog gives 93.2%).

More retries, or a trained team?

Since one agent cannot solve the task alone, the authors take the untrained team with retries as the nearest fair baseline. Each update already ran eight attempts per problem and the answers are easy to check, so early training data shows how often at least one of eight attempts succeeded.

With eight tries the untrained team solves fewer than half the problems and spends about 13 times as many tokens as one trained attempt, the post says.

The authors ask readers to treat this as an estimate. Both rows use training problems, not held-out ones; updates 2–5 already come from a slightly trained policy; and the token figures are training measurements, as no held-out token data was kept for the trained checkpoint.

Terms in plain English

These explanations are ours.

Where things stand

The post includes a reproducible version: TRL's swarm example run on Hugging Face Jobs, with one H200 serving the model and a second training it. The authors put that run at about five hours on two H200s, roughly $50. The next posts in the series will look at how to evaluate and analyse swarms, and later at a task a single agent can solve, where communicating and independent agents can be compared at the same budget.

Sources

Sources

Related stories

More from Teach the Bot

All stories from Teach the Bot