1,024 AI Agents, Zero Orchestrators: How Microsoft’s Agensh Makes Self-Organizing Collaboration Actually Work
Should a swarm of AI agents have a manager? Microsoft Research tested the alternative and published the results in a technical report on Agensh, a multi-agent harness where 1,024 agents coordinate with no central orchestrator at all. Scaling from 1 to 128 agents lifted the mean pass rate on five brutal software-engineering tasks from 19.31% to 28.78%, roughly a 49% relative improvement. On the pandoc task, 1,024 agents pushed the pass rate from 33.89% to 55.06%. The part I find more interesting than the scores: as the team grew, the agents developed their own division of labor, review workflows, and specialist roles. Nobody taught them how.
This post breaks down the system’s design, its actual work instructions, and the experiment data. The code is open source at github.com/microsoft/Agensh. If you’re building a multi-agent system yourself, the second half of this post is the part worth reading line by line.
Suggested image: an overhead shot of an open workspace or a construction site, evoking a team that coordinates without a command center. Image source: Unsplash
Why does a single AI agent struggle with big jobs?
Short answer: one memory, one action stream, everything queues.
The report defines a single-agent system as a large language model that perceives context, takes actions through tools, updates state, and iterates toward a goal. That works fine for small tasks. The ceiling comes from three “ones”: one context window limits what the model can see at once, one action stream forces work to happen sequentially, one memory stream means a single record of what has been done. Once a task grows complex, serial execution turns into a long wait.
The obvious fix is more agents running in parallel. The report names the frameworks already doing this: Codex sub-agents, Claude Code sub-agents and agent teams, Copilot fleet, Kimi Agent Swarm.
But there’s a catch, and it’s the reason Agensh exists.
Why do multi-agent systems bottleneck at the orchestrator?
One sentence: task decomposition, assignment, and consolidation all pass through a single coordinator, and past a certain team size, that coordinator saturates.
Nearly every framework above uses an orchestrator-worker structure. A main agent plans, decomposes tasks, hands them to concurrent workers, and manages the results. The report flags two problems with this. First, the structure typically requires a trained orchestrator to plan and decompose tasks well. Second, and more fundamentally, the scalability of the whole system stays bounded by the orchestrator’s capacity to manage workers and integrate their contributions.
Anyone who has worked on a real team knows this pattern. If one person is the only one who understands the whole picture, every requirement gets decomposed by them, every status report flows to them, every result gets merged by them. Grow the team from five to fifty and the bottleneck is still that one person. Headcount goes up; throughput doesn’t.
Agensh attacks this directly. Its answer isn’t a stronger orchestrator. It’s no orchestrator at all.
With no boss, how do 1,024 agents coordinate?
Three pieces of shared infrastructure: a shared workspace, a message interface, and a shared context board. Worker agents run concurrently and asynchronously, doing their own work and syncing state through these three facilities.
The shared workspace is a file system holding all of the organization’s work, both in-progress and integrated. Agensh implements it with a Git platform (Gitea). Workers modify private checkouts and branches, then integrate contributions into a main branch. Git records the provenance of changes, detects textual merge conflicts, and hosts issues and pull requests for everyone. Nobody adjudicates conflicts; the Git machinery surfaces them, and whoever hits a conflict resolves it.
The message interface runs on Mattermost. A shared task channel carries team announcements; direct messages handle urgent one-to-one coordination. Delivery is tiered by priority: lower-priority channel messages arrive at the start of each loop iteration, while higher-priority direct messages arrive at the end of each infrastructure tool call. The design intent is explicit, let workers resolve overlapping claims, negotiate dependencies, and ask for help without interrupting everyone else’s work.
The shared context is an append-only board of reusable findings, an idea adopted from DeLM. Workers publish short, typed entries. The service keeps them in an append-only database with recent memory, plus full-history search. New entries are treated as higher-priority updates and forwarded to every other worker the next time that worker’s infrastructure tool call returns. A fact a peer just confirmed lands in everyone’s view almost immediately.
One line from the report is worth memorizing: these mechanisms connect each worker’s local activity to the organization’s shared state. That’s the whole trick.
What does each agent’s work loop look like?
Five steps: gather context, claim a sub-task, take action, verify results, merge progress. Every agent runs this loop concurrently and asynchronously, and after step five it loops back to step one.
Gather context. The worker reads the shared goal, current state, peer progress, messages, and accumulated findings, figures out what’s done and what’s untouched, then plans its next move. The reasoning here is basic: skip this step and you duplicate work. In an organization of a thousand agents, duplicated work burns everyone’s budget.
Claim a sub-task. The worker proposes its own sub-task and announces its scope as a CLAIM on the shared context. When two claims overlap or conflict, the agents are encouraged to settle it through direct messages. Note what’s absent here: nobody assigns work. Tasks are discovered and claimed by the agents themselves. That’s what “self-organizing” means in this system.
Take action. The worker solves its sub-task locally with the available tools, updating the shared context whenever it establishes a finding that might help others.
Verify results. The worker checks its local progress against the sub-task’s acceptance criteria and revises its approach until the criteria are met.
Merge progress. The worker merges its contribution into the shared workspace and publishes an update describing what changed, the idea behind it, and the verification evidence, so peers can build on the result. If the merge is blocked by a conflict, the worker incorporates the latest peer progress, resolves the conflict, and merges again.
The loop is asynchronous throughout. No worker waits for all peers to finish an iteration. Findings and verified contributions accumulate through the shared infrastructure, and that accumulation is what moves the organization toward the goal.
How does the shared context board actually work?
Five entry types, two search tools, and a few hard rules. The board is the highest-information-density part of the whole design, so it deserves its own section.
The entry types: OBSERVED for notable reference behavior, FACT for confirmed findings, FAIL for approaches that were tried and falsified, CLAIM for work in progress, and PATCH_SUMMARY for completed changes.
My own read is that FAIL is the most valuable entry on the board, and the report agrees, calling it the highest-value entry because it stops peers from spending budget on a dead end. When a thousand agents are exploring in parallel, the expensive failure mode isn’t doing the wrong thing once. It’s a hundred agents doing the same wrong thing at the same time. One FAIL entry eliminates that cost entirely.
The usage rules are concrete. Entries are capped at 100 characters, 300 for PATCH_SUMMARY; longer versions go in a detail field that peers can expand with board_unfold. Two search tools cover retrieval:
board_read returns the full recent board (truncated to the 2,000 latest entries)
board_grep searches entries by keyword across the complete history
board_grep supports compound queries: , is OR and & is AND, case-insensitive, so a&b,c&d means (a AND b) OR (c AND d).
Three disciplines are written into the work instructions: never re-derive a peer’s FACT, never retry anything recorded as FAIL, and reach for coordination tools only when your information would greatly impact others’ work. I agree with the last one in particular. Coordination itself has a cost, and broadcasting every minor update just fills everyone’s context window with noise.
How do you reproduce this experiment?
The report’s appendix publishes the complete worker prompt for the 1,024-agent configuration. Every worker’s prompt is identical except for the worker ID. This is the most hands-on part of the paper.
The task setup: each container has a pre-compiled reference program mounted at /opt/pbench/executable. The job is to rebuild a complete codebase that reproduces its behavior, such that it compiles and passes hidden tests. The agents’ only information source is running the program and observing it: try –help, feed it inputs, inspect outputs, compare boundary cases. There’s a hard line too. The binary’s permissions are root:root 0111, so cat, od, and objdump all fail. The prompt states plainly that this is a rule, not a fault, and that attempting to decompile it is cheating.
Three iron rules, violating any one voids the entire task:
-
Fully autonomous. The whole team defines requirements itself, breaks down work itself, decides itself, finishes itself. There is no external input, and agents must not ask “what should I do next.” The answer is always: push the rebuild forward. -
No internet. The entire cluster is offline. git clone of the original project, pip install, and npm i of remote packages will all fail. Only the toolchain already in the container (gcc, make, python, node, and so on) is usable. -
Hard delivery constraint. The repo root must contain an executable compile.sh, and running it must produce an executable named ./executable at the repo root.
The third rule hides the biggest trap. Here’s the evaluation flow:
tar the repo HEAD → unpack → delete any committed ./executable
→ run ./compile.sh → run hidden tests against the new ./executable
Read that again. The executable you committed gets deleted before evaluation. compile.sh must generate the file; simply chmod-ing an existing one scores zero. Missing compile.sh at the root means zero points outright. The prompt bolds this warning, which tells me plenty of prior runs tripped on it. I nearly skimmed past it myself.
The standard six-step work cycle from the prompt:
-
Run /opt/pbench/executable and observe areas that haven’t been explored yet. -
Announce the area you’re taking as a CLAIM on the shared context board. -
Run the reference on that area under ulimit -v 67108864and write code that reproduces what you observe, based on current main. No need to sync with anyone during implementation. -
Check your work by running the reference and your build on the same inputs and comparing. -
Push, open a PR, and merge to main. If the merge is refused, merge the latest main into your branch, re-check your work against the reference, and push again. -
Publish a PATCH_SUMMARY ( files= | idea= | evidence=) on the board, then go back to step 1.
A few more repo conventions. In Gitea, issue #1 is the overall task; agents open their own issues for areas they take and carry work in PRs. Sync your codebase with the latest main before merging your own code into it. Commit everything the build needs, because the grader builds from a fresh clone of main and doesn’t invoke your binary from the repo root, so data paths must be resolved with something like dirname(realpath(argv[0])) rather than hardcoded.
Two operational gotchas are worth flagging. First, Gitea returns external clone_url and html_url values that are unreachable from inside the container; substitute http://gitea:3000 whenever one appears. Second, a direct message reaches a peer inside their current turn, which makes it the fastest way to settle a collision but also interrupts what they’re doing. The rule in the prompt: send a direct message when two of you are about to edit the same thing; use the channel for everything else.
What keeps a thousand concurrent workers from falling apart?
An event-driven runtime with durable queues, plus two safety nets. Appendix B covers the runtime, and it’s the most transferable engineering content in the report for anyone building something similar.
Each worker is driven by events rather than a centrally scheduled sequence. A paired router listens for two things: repository activity from Gitea and messages from Mattermost. On the Gitea side, a server-sent event triggers a fetch of notifications newer than the last processed one. On the Mattermost side, a live connection delivers messages and a reconnect catch-up retrieves anything missed while disconnected. New activity lands in the worker’s durable queue and wakes the dispatcher. Every event carries a unique ID for deduplication.
Events look like this:
[event]
event_id=...
source=... <- gitea / mattermost / ...
kind=...
observed_at=...
summary: ... <- what happened and where to find it
Events report facts; deciding what to do about them is the worker’s job. On each wake, the dispatcher orders and combines pending events into the next prompt, delivers it to the worker’s persistent session, and marks events as sent when the turn completes. Events arriving mid-turn stay queued for the next turn. Failed deliveries retry after progressively longer waits, and after a router restart, unfinished events return to the queue with the worker’s prior session restored where possible.
The two safety nets: if a worker sits idle for 10 minutes, an idle detector sends a prompt telling it to continue working. And if a completed turn produces no shared context entry, a follow-up prompt reminds the worker to publish useful findings. Shared context reaches workers through two delivery paths: appended to the prompt at the start of a new turn, or wrapped onto tool-call results during an active turn. That second path operates on MCP tool returns and never interrupts an arbitrary running process.
Do more agents actually translate into better results?
Yes, on both quality and speed. This is the experimental core of the report.
The benchmark is ProgramBench, one of the most demanding tests in agentic software engineering: an agent organization must reproduce the behavior of reference software from scratch, offline, within a 6-hour budget. The authors picked the five hardest of ProgramBench’s 200 instances, ranked by the mean pass rate of state-of-the-art models: FFmpeg, gromacs, pandoc, PHP-src, and ctags. The scale gives a sense of the challenge:
| Task | Files | Lines of code | Code size |
|---|---|---|---|
| FFmpeg | 10,090 | 1,549,005 | 75.51 MB |
| gromacs | 8,982 | 815,539 | 47.30 MB |
| pandoc | 2,767 | 104,336 | 4.86 MB |
| PHP-src | 26,266 | 2,812,757 | 119.76 MB |
| ctags | 7,313 | 246,228 | 9.15 MB |
The experimental controls are clean: same model (gpt-5.6-sol at high reasoning effort), same underlying single-agent harness (Copilot), same 6-hour budget, same evaluation configuration. The only variable is agent count.
| Agents | Mean pass rate across 5 tasks |
|---|---|
| 1 | 19.31% |
| 8 | 20.68% |
| 32 | 26.52% |
| 128 | 28.78% |
Going from 1 to 128 agents adds 9.47 percentage points, roughly a 49% relative improvement. Scores trend upward across all five tasks as the organization grows.
Speed improves too. On pandoc during the first two hours, 128 agents crossed a 30% pass-rate threshold at the 30-minute checkpoint, while 32 and 8 agents first crossed it at 60 and 90 minutes. The single-agent run never reached that threshold in the first two hours at all. More agents don’t only raise the final score; they shorten the time needed to hit a given performance level.
The scaling holds at four digits. On pandoc, going from 1 to 1,024 agents moved the pass rate from 33.89% to 50.94% at 128 agents to 55.06% at 1,024. The deployment details matter too: 1,024 workers spread across 16 nodes at 64 agents per node, with staggered activation, one agent every 30 seconds for the first hour and one every 3 seconds after that, to reduce scope contention. Two organization-wide reminders close out the run. At T minus 45 minutes: stop dispatching new features, make sure the root build works and existing work is merged, land open PRs, and if one can’t be merged, say so and move on. At T minus 5 minutes: merge anything ready, then stop, confirming bash compile.sh && ./executable works on the default branch and posting the final state.
Those two reminders struck me as the most project-management-savvy detail in the entire report. The classic failure mode for a big team is opening new fronts in the final stretch. Locking scope 45 minutes out and verifying deliverables 5 minutes out is a discipline thing, not a headcount thing.
One more baseline detail: a single agent rarely sustains a full 6-hour run in practice, so the single-agent baseline got a stop hook telling it there is always new work, pick up the reference, run it against untried inputs, and derive fresh tasks from what the interaction reveals.
What emerges as the team grows?
Four stages: peer coordination, multi-worker integration, standardized workflows, and specialized roles. Every agent runs the same loop with the same prompt, yet the cooperation forms at different scales are strikingly different.
8 agents: coordinating implementation with peers. Workers agree on a concrete technical interface and then implement components against it independently. In gromacs, a worker announced a module interface and others implemented command modules that followed it. They also discover and resolve overlapping claims on their own; in FFmpeg, one worker changed its scope and took on complementary work after discussing an overlap with a peer.
32 agents: managing integration across multiple workers. In PHP-src, several peers initially approved a contribution. Another worker found a concrete counterexample, the earlier approval was withdrawn, the author fixed the problem, peers re-reviewed, and a peer merged the result. Approval, veto, fix, re-review, merge. A complete code-review pipeline that nobody designed.
128 agents: specialization and workflow standardization. Workers choose reviewers based on relevant prior experience and reuse those review relationships over time. They also hand off integration responsibility to a peer who resolves conflicts, validates the combined work, and merges. In pandoc, two workers established a standardized integration protocol: the author updates and tests a branch, then sends its commit hash for peer validation and merge. Other workers adopted the protocol. After some failures, they revised it, agreeing to let the peer run the entire update-test-check-merge cycle, and the peers explicitly accepted and carried out the revised procedure for new pull requests.
1,024 agents: role specialization at organization scale. Multiple workers hold the same specialized role or develop expertise in the same technical area. In pandoc, several workers serve as integrators. A worker can contact several candidate integrators, select the first valid responder, cancel the other requests, and only then hand over the code. Agents specializing in the same area can also take over the work after another agent’s attempt fails, which the report credits with strengthening robustness by avoiding dependence on any individual worker.
The report emphasizes that all of this is self-organized: the workers themselves choose collaborators, divide responsibilities, and establish and revise their workflows through peer interactions. When I first read the report, this section surprised me more than the scores did. The scores prove the approach works. The emergent cooperation forms suggest that “organization” might genuinely grow on its own, given a few simple shared facilities.
What can you borrow for your own multi-agent build?
Four architecture decisions you can lift directly, plus a pitfall list.
Layer, don’t replace. Agensh sits above a single-agent harness rather than replacing it. The lower layer governs how one worker reasons and acts: conversational state, model invocation, tool execution. Agensh governs organization-level behavior: how many workers receive events, how they share state, how they coordinate and contribute. The interface is deliberately minimal and plug-and-play. The cooperation loop lives in the workers’ prompts, not hardcoded into the runtime, so Agensh can connect to different underlying harnesses (the report mentions Claude Code and Copilot) through lightweight adapters without changing the loop, the shared services, or the agentic loop itself.
Turn coordination into infrastructure. Task discovery, claiming, and progress sharing all get pushed down to the workers. Build effort concentrates on the three facilities: a shared workspace with version history and exposed merge conflicts, a tiered message interface, a typed and searchable shared context board.
Don’t skimp on the runtime. Event deduplication by unique ID, durable queues, retries with backoff, session restoration after restarts, idle detection, no-output reminders. None of these are glamorous, and all of them are what keeps a thousand concurrent workers from dropping or garbling messages.
Design the closing discipline up front. Staggered activation, the two-stage pre-deadline reminders, and keep-alive hooks for single-agent baselines all belong in the plan from day one, not bolted on later.
The pitfall list, compiled from across the report: publish your CLAIM or collisions are inevitable, and settle them by direct message; sync with latest main before merging; compile.sh must generate the artifact, not chmod one, because evaluation deletes committed artifacts; never hardcode paths; offline is a rule, not a fault; never retry a FAIL; never re-derive a FACT; treat direct messages as interrupting tools reserved for imminent collisions, nothing less.
Suggested image: a kanban board covered in notes, standing in for the shared context board. Image source: Pexels
Practical checklist
-
One memory and one action stream cap a single agent; complex work needs parallelism. -
The orchestrator is the scalability bottleneck; push task discovery and assignment down to workers. -
Three facilities carry self-organization: a Git workspace, a tiered message interface, a typed shared board. -
The worker loop is five steps: gather context, claim, act, verify, merge, all asynchronous. -
FAIL entries are the highest-value item on the board; they stop peers from burning budget on dead ends. -
For delivery-constrained tasks, the build script must generate the artifact; evaluators delete committed ones. -
Runtime essentials: event dedup, durable queues, retry and recovery, idle detection. -
Agent count is a scaling dimension: +49% relative at 128 agents; 55.06% on pandoc at 1,024.
One-page recap
Agensh is a multi-agent collaboration system from Microsoft Research with no central orchestrator, open-sourced for anyone to use. Workers run the same five-step loop concurrently and asynchronously, coordinating through a shared workspace, a message interface, and a shared context board. The experiments ran on the five hardest ProgramBench tasks under a 6-hour offline budget, rebuilding FFmpeg, gromacs, pandoc, PHP-src, and ctags from scratch. Scaling from 1 to 128 agents raised the mean pass rate from 19.31% to 28.78%; on pandoc, 1,024 agents reached 55.06%. Larger organizations hit the same performance levels sooner and spontaneously developed four layers of cooperation: peer coordination, multi-worker integration, standardized workflows, and role specialization.
FAQ
Does Agensh require training a dedicated orchestrator model?
No. There is no orchestrator. The cooperation loop is implemented through workflow instructions in each worker’s prompt.
Can I swap in a different underlying agent framework?
Yes. The interface is intentionally minimal; the report mentions lightweight adapters for Claude Code and Copilot that leave the cooperation loop and shared services untouched.
Can agents access the internet during experiments?
No. The entire cluster is offline, and attempting to fetch the original source is both impossible and classified as cheating.
Is there a length limit on shared context entries?
Standard entries are capped at 100 characters and PATCH_SUMMARY at 300; longer content goes in a detail field that peers expand with board_unfold.
Who handles merge conflicts?
Whichever worker’s merge is blocked incorporates the latest peer progress, resolves the conflict, and merges again.
What happens when a worker goes idle?
After 10 minutes of idling, an idle detector sends a prompt telling the worker to continue.
How are 1,024 workers deployed?
16 nodes with 64 agents each, launched one every 30 seconds for the first hour, then one every 3 seconds.
Where can I get the code?
github.com/microsoft/Agensh, with the project page at aka.ms/Agensh.

