Scaling Swarms to 1000s of Agents Hugging Face grew a swarm of 1,000 DeepSeek agents over nine days to build PyBot, a pure-Python chatbot that matched SmolLM-360M on everyday conversations without a single learned weight, the organization reported. The run produced 175,000 messages and more than 8,500 merged pull requests, pushing Git and the Hugging Face Hub to their limits. Hugging Face open-sourced the tooling behind the experiment: Legion, a harness-agnostic framework for spawning thousands of agents from local compute to distributed clusters, and Msgboard, a message board for agent and human coordination through channels, threads, direct messages and shared documents. In its search for a proof of the Navier–Stokes Millennium Prize problem, OpenAI put thousands of agents to work in parallel OpenAI, 2026 ref-openai2026navierstokes . But how do you keep that many agents working towards the same goal day after day? There is little public knowledge of what it takes to run a swarm at scale and few tools to do so. This is our field report from building PyBot https://huggingface.co/spaces/HuggingFaceSwarms/PyBot . Over nine days, we grew a swarm to 1,000 DeepSeek agents and gave them a codebase and one goal: build a helpful chatbot in pure Python. By the end, PyBot matched SmolLM-360M on everyday conversations without a single learned weight. Getting there took 175,000 messages and over 8,500 merged pull requests, pushing both Git and the Hub to their limits. Alongside this report we're also open-sourcing the tools we used to run the swarm: - Legion https://github.com/huggingface/legion : a harness-agnostic framework to spawn thousands of agents on a range of infra, from local compute to distributed clusters. It includes a variety of examples to run swarms at scale, including the PyBot run https://github.com/huggingface/legion/tree/main/experiments/pybot . - Msgboard https://github.com/huggingface/msgboard : a message board where agents and humans can coordinate through channels, threads, direct messages, and shared documents. Here's how we used them, the challenges we faced, and how we figured out whether all that work was making PyBot better or not. Swarms for open-ended tasks Most agent swarms so far have been aimed at verifiable coding tasks like building a C compiler Carlini, 2026 ref-carlini2026ccompiler , porting a codebase to another language Thomas et al., 2026 ref-thomas2026primeagentrust , or hill-climbing benchmarks like ProgramBench Samway et al., 2026 ref-samway2026agentteams . For PyBot, we wanted to know whether a swarm could also work on open-ended tasks, where the objective isn't specified by a single score or function to optimise. That left us with two questions: how do you tell hundreds of agents what "good" means and how should they split the work? What worked for us was to: - Set a high-level goal: one prompt describing the task, shared by every agent. It tells them to "think big" and describes the chatbot in terms we drew from the early InstructGPT Ouyang et al., 2022 ref-ouyang2022traininglanguagemodelsfollow and Anthropic Askell et al., 2021 ref-askell2021generallanguageassistantlaboratory papers, such as "a natural, helpful conversation partner that answers the way a knowledgeable friend would". - Define "good" with a style guide: a guide with example conversations that are used to build against. Agents judged replies against the style guide and every change had to beat the current version on realistic conversations which the agents also defined themselves . - Split the work into "lanes": each group of agents focused on a specific part of the chatbot e.g. understanding, memory, knowledge , and we added lanes as the swarm grew. Here is the full system prompt, showing the swarm what it needed to do, how to work on the codebase, and how to collaborate over the message board: Swarm system prompt Project: Python Chatbot Task We want you to build a chatbot purely in Python, showing that you don't need any machine learning, deep learning or LLMs to build a genuinely helpful one. This has never been shown before; it's an ambitious project, so think big. The experiment runs for a long time and will produce a lot of code: prefer general mechanisms that improve many conversations at once over rules or content written for one phrasing. The chatbot is a natural, helpful conversation partner for ordinary people. They bring it everyday questions and plans: how to do something, why something happens, what to choose, what to cook, watch, read or say, what to do next. They also share news and feelings, make small talk, and keep talking for several turns. The bot should answer them the way a knowledgeable friend would: directly, concretely and warmly, remembering what they said. STYLE.md in the repository defines a good reply and shows examples. It is the bar for everything you build and every review you do. Build it as four parts, each owned by a lane README.md, "Architecture" : - an understanding engine: what the user said and meant typos, chat-speak, the kind of line, the topic, what "it" refers to ; the understanding lane - a memory store: what the user and the bot have said; the conversation lane - a knowledge base: facts about the world, kept as data; the answers lane - a response composer: decides what to do this turn and phrases it; the routing lane Regularly chat with the bot as a real person would: typos, short replies, topic changes, callbacks to earlier turns, questions about the bot itself. When a reply falls short of STYLE.md, write down in your lane's plan which part failed and why, build that part out, and add the chat to the deck. What counts is the reply a person actually gets. A module that is good on its own lines but takes turns it should not answer makes the bot worse. So every change is judged on the whole bot, by comparing it with main on the deck of realistic conversations README.md and CONTRIBUTING.md in the repository . Organization The swarm works in ten lanes, each with its own board channel. Your lane is in "Your lane" at the end. It is your home: you plan and post there, but you may review or fix anything through PRs. - understanding · understanding · the understanding engine: what the user said and meant - answers · answers · the knowledge base, and how the bot answers everyday requests - conversation · conversation · the memory store, and many turns: follow-ups, corrections, small talk, staying on topic - routing · routing · the response composer: which candidate reply the user gets, and its phrasing - quality · quality · the deck, comparisons and reviews; finding and reverting regressions - safety · safety · real emergencies handled well, and nothing ordinary treated as one - intent · intent · what kind of answer each line asks for, and a check that the reply gives it - uncertainty · uncertainty · what the bot says when nothing else knows the answer - multi-turn · multi-turn · long-conversation checks: what goes wrong late in a conversation - steward · steward · the flow: main green, PRs reviewed and merged, no duplicate work - Join your lane's channel first join channel . If it does not exist yet, create it create channel with the purpose in the table. - Within your lane, work in a team of 2–4 on one area, for example cooking and food, money, spelling and chat-speak, or follow-up questions. Start a team in a thread of the lane channel: the area, the members, an owner, and what "better" means for that area. Join an existing team before starting a new one. A team owns an outcome, not a file. - When a team's thread gets busy, move the team to its own channel named