Microsoft Research has open-sourced Agensh, a decentralized harness for large teams of coding agents. The Agensh multi-agent harness removes the central orchestrator that most agent frameworks depend on. Every worker picks its own sub-task, shares findings and merges code into a common Git repo. On ProgramBench, the team scaled the setup from 1 agent to 1,024 agents.
TL;DR
- A Harness: Tested from 1 to 1,024 agents. Each worker gets a 272,000-token input and 128,000-token output limit.
- Runs on: Linux with Docker Compose. Single node by default (8 workers). The 1,024-agent run used 16 nodes, 64 agents each. Workers have a 64 GiB memory ceiling.
- Performance: more agents raised scores on all 5 hardest ProgramBench tasks, and reached them sooner.
- Best: 79.59% pandoc pass rate with 32 agents on GPT-6.1-sol. GPT-5.6-sol hit 55.06% with 1,024 agents.
- Worst: the 5-task mean reached only 28.78% at 128 agents. Going from 1 to 8 agents added 1.37 points.
What is Agensh?
Agensh is a multi-agent harness from Microsoft Research that coordinates many LLM agents without a lead agent.
The target problem is the orchestrator ceiling. In orchestrator-worker designs, a lead agent plans, assigns and merges all work. The research paper cites Claude Code agent teams, Codex sub-agents, Copilot fleet and Kimi Agent Swarm as examples. Agensh lets the workers do that coordination themselves.
How does the Agensh cooperation loop work?
Each worker runs the same 5-step loop, concurrently and asynchronously:
- Gather context: read the goal, peer progress, messages and findings.
- Claim a sub-task: post a CLAIM, then settle overlaps by direct message.
- Take action: work locally with tools and post useful findings early.
- Verify results: check the work against the sub-task’s acceptance criteria.
- Merge progress: merge into the shared repo, post an update, then repeat.
Three services connect the workers. Gitea hosts the shared workspace, with branches, PRs and merge conflicts. Mattermost carries a team channel plus direct messages for urgent collisions. A shared context board, adapted from DeLM, stores typed notes: OBSERVED, FACT, FAIL, CLAIM and PATCH_SUMMARY.
The loop lives in the prompt, not in runtime code. Every worker gets the same prompt except its ID. Agensh sits on top of a single-agent harness. The experiments used GitHub Copilot CLI. The research paper states thin adapters can connect other harnesses, such as Claude Code.
‘+s.t+’
‘;b.onclick=function(){stop();show(i)};L.appendChild(b)});
function show(i){cur=i;[].forEach.call(L.children,function(e,j){e.classList.toggle(‘on’,j===i)});D.style.borderLeftColor=steps[i].c;D.innerHTML=’Step ‘+(i+1)+’: ‘+steps[i].t+’
‘+steps[i].d+’
‘}
function stop(){if(timer){clearInterval(timer);timer=null;P.textContent=”▶ Auto-play loop”}}
var P=document.getElementById(‘agxPlay’);
P.onclick=function(){if(timer){stop();return}P.textContent=”❚❚ Pause”;timer=setInterval(function(){show((cur+1)%5)},1800)};
document.getElementById(‘agxNext’).onclick=function(){stop();show((cur+1)%5)};
show(0);
// orbit
var O=document.getElementById(‘agxOrb’),ns=”http://www.w3.org/2000/svg”;
var hub=document.createElementNS(ns,’rect’);hub.setAttribute(‘x’,70);hub.setAttribute(‘y’,44);hub.setAttribute(‘width’,60);hub.setAttribute(‘height’,32);hub.setAttribute(‘rx’,6);hub.setAttribute(‘fill’,’#161b24′);hub.setAttribute(‘stroke’,’#0078D4′);O.appendChild(hub);
var ht=document.createElementNS(ns,’text’);ht.setAttribute(‘x’,100);ht.setAttribute(‘y’,64);ht.setAttribute(‘text-anchor’,’middle’);ht.setAttribute(‘font-size’,’9′);ht.setAttribute(‘fill’,’#e8edf5′);ht.textContent=”shared infra”;O.appendChild(ht);
for(var k=0;k<16;k++){var a=k/16*Math.PI*2,x=100+82*Math.cos(a),y=60+50*Math.sin(a);
var ln=document.createElementNS(ns,’line’);ln.setAttribute(‘x1’,x);ln.setAttribute(‘y1’,y);ln.setAttribute(‘x2’,100);ln.setAttribute(‘y2’,60);ln.setAttribute(‘stroke’,’#00A4EF’);ln.setAttribute(‘stroke-width’,’.6′);ln.setAttribute(‘class’,’pulse’);ln.style.animationDelay=(k*0.15)+’s’;O.appendChild(ln);
var c=document.createElementNS(ns,’circle’);c.setAttribute(‘cx’,x);c.setAttribute(‘cy’,y);c.setAttribute(‘r’,3.5);c.setAttribute(‘class’,’w’);O.appendChild(c)}
// tabs
var tabs=R.querySelectorAll(‘.tab’),pans=R.querySelectorAll(‘.panel’);
[].forEach.call(tabs,function(t){t.onclick=function(){[].forEach.call(tabs,function(x){x.classList.toggle(‘on’,x===t)});[].forEach.call(pans,function(p){p.classList.toggle(‘on’,p.getAttribute(‘data-p’)===t.getAttribute(‘data-t’))});if(t.getAttribute(‘data-t’)===’scale’)draw(curSet);if(t.getAttribute(‘data-t’)===’emerge’)rung(curR);rs()}});
// infra
[].forEach.call(R.querySelectorAll(‘.svc’),function(s,i){if(i>0)s.classList.remove(‘on’);s.onclick=function(){s.classList.toggle(‘on’);rs()}});
var tg={OBSERVED:’Noticeable behaviour of the reference program.’,FACT:’Something a worker confirmed. Peers should not re-derive it.’,FAIL:’A falsified hypothesis. The paper calls it the highest-value entry: it stops peers spending budget on it.’,CLAIM:’The area a worker is building right now, so peers pick a different angle.’,PATCH_SUMMARY:’files= | idea= | evidence= for a finished fix. Capped at 300 characters; other entries at 100.’};
var T=document.getElementById(‘agxTags’),TD=document.getElementById(‘agxTagD’);
Object.keys(tg).forEach(function(k){var b=document.createElement(‘span’);b.className=”tag”;b.textContent=k;b.onclick=function(){[].forEach.call(T.children,function(e){e.classList.toggle(‘on’,e===b)});TD.innerHTML=’‘+k+’: ‘+tg[k];rs()};T.appendChild(b)});
// scaling
var sets={
mean:{rows:[[‘1 agent’,19.31],[‘8 agents’,20.68],[’32 agents’,26.52],[‘128 agents’,28.78]],max:100,call:[[‘+9.47 pts’,’1 to 128 agents, 5-task mean’],[‘~49%’,’relative improvement’],[‘5 tasks’,’FFmpeg, gromacs, pandoc, PHP-src, ctags’]]},
pan:{rows:[[‘1 agent’,33.89],[‘8 agents’,41.75],[’32 agents’,43.11],[‘128 agents’,50.94],[‘1,024 agents’,55.06]],max:100,call:[[‘+21.17 pts’,’1 to 1,024 agents on pandoc’],[’30 min’,’128 agents pass 30% (8 agents: 90 min)’],[’16 nodes’,’64 agents per node at 1,024′]]},
pan61:{rows:[[‘1 agent’,56.19],[‘8 agents’,71.38],[’32 agents’,79.59]],max:100,call:[[‘79.59%’,’pandoc, 32 agents’],[‘41.64%’,’relative gain over 1 agent’],[‘README’,’not in the v1 paper’]]}};
var B=document.getElementById(‘agxBars’),C=document.getElementById(‘agxCall’),curSet=”mean”;
function draw(k){curSet=k;var s=sets[k];B.innerHTML=”;C.innerHTML=”;
s.rows.forEach(function(r){var d=document.createElement(‘div’);d.className=”row”;d.innerHTML=’‘+r[0]+’0%‘;B.appendChild(d);
var f=d.querySelector(‘.fill’),v=d.querySelector(‘.v’);setTimeout(function(){f.style.width=(r[1]/s.max*100)+’%’},40);
var st=null;function an(ts){if(!st)st=ts;var p=Math.min((ts-st)/900,1);v.textContent=(r[1]*p).toFixed(2)+’%’;if(p<1)requestAnimationFrame(an)}requestAnimationFrame(an)});
s.call.forEach(function(c){var e=document.createElement(‘div’);e.className=”stat”;e.innerHTML=’
‘+c[0]+’
‘+c[1]+’
‘;C.appendChild(e)});
[].forEach.call(document.getElementById(‘agxSeg’).children,function(b){b.classList.toggle(‘pri’,b.getAttribute(‘data-s’)===k)});rs()}
[].forEach.call(document.getElementById(‘agxSeg’).children,function(b){b.onclick=function(){draw(b.getAttribute(‘data-s’))}});
// emergence
var em=[[8,’Peer coordination’,’In gromacs, workers agreed on a module interface and built modules to it independently. In FFmpeg, one worker changed scope after discussing an overlap.’],
[32,’Multi-worker integration’,’In PHP-src, peers approved a contribution. Another worker found a counterexample, the approval was withdrawn, the author fixed it and a peer merged it.’],
[128,’Standardized workflows’,’Workers chose reviewers by prior experience. In pandoc, 2 workers set an integration protocol that others reused, then revised it after failures.’],
[1024,’Specialized roles’,’In pandoc, several workers served as integrators. A worker contacted candidates, picked the first valid responder and cancelled the rest. Peers recovered failed work.’]];
var LD=document.getElementById(‘agxLad’),E=document.getElementById(‘agxEmg’),DT=document.getElementById(‘agxDots’),curR=0;
em.forEach(function(e,i){var b=document.createElement(‘div’);b.className=”rung”;b.innerHTML=’
‘+e[0].toLocaleString(‘en-US’)+’
agents
‘;b.onclick=function(){rung(i)};LD.appendChild(b)});
function rung(i){curR=i;[].forEach.call(LD.children,function(e,j){e.classList.toggle(‘on’,j===i)});E.innerHTML=’
‘+em[i][1]+’
‘+em[i][2]+’
‘;
DT.innerHTML=”;var n=Math.min(em[i][0],128);for(var k=0;k
// resize
function rs(){try{var h=R.offsetHeight+40;parent.postMessage({agxHeight:h},’*’)}catch(e){}}
window.addEventListener(‘load’,rs);window.addEventListener(‘resize’,rs);setTimeout(rs,300);setTimeout(rs,1200);
})();


