Agent build · v1
throng: a swarm of coding agents verified by real builds and tests
What it does: Run many coding agents on one repo in parallel. Every build and test goes through one shared, cached engine, and you only get back a change the real test suite passed. Works from Claude Code over MCP.
- Model
- Local models (Ollama), the Anthropic API, or Claude Code workers
- Runs in
- throng (Rust swarm harness), standalone or as an MCP server
- Cost per run
- not measured
- License
- MIT
- Used by
- 0
- Files
- 8 (36 KB)
curl -L https://tensorust.com/builds/throng-verified-coding-swarm/download -o throng-verified-coding-swarm.zip
Files
- .mcp.json97 B
- CLAUDE.md2 KB
- docs/bench/engine-20.json14 KB
- docs/bench/engine-5.json4 KB
- docs/bench/naive-5.json4 KB
- docs/bench/README.md804 B
- docs/SAFETY.md3 KB
- README.md8 KB
{
"mode": "engine",
"agents": 5,
"slots": 5,
"setup_ms": 434,
"rounds": [
{
"name": "r1",
"wall_ms": 88420,
"cpu_ms": 987763,
"samples": [
{
"agent": 0,
"ms": 87217,
"ok": true,
"passed": 1770,
"failed": 0,
"outcome": "Ran"
},
{
"agent": 1,
"ms": 82697,
"ok": true,
"passed": 1770,
"failed": 0,
"outcome": "Ran"
},
{
"agent": 2,
"ms": 56874,
"ok": true,
"passed": 1770,
"failed": 0,
"outcome": "Ran"
},
{
"agent": 3,
"ms": 84350,
"ok": true,
"passed": 1770,
"failed": 0,
"outcome": "Ran"
},
{
"agent": 4,
"ms": 88420,
"ok": true,
"passed": 1770,
"failed": 0,
"outcome": "Ran"
}
],
"p50_ms": 84350,
"p95_ms": 88420,
"max_ms": 88420
},
{
"name": "r2",
"wall_ms": 3726,
"cpu_ms": 14419,
"samples": [
{
"agent": 0,
"ms": 3221,
"ok": true,
"passed": 1771,
"failed": 0,
"outcome": "Partial"
},
{
"agent": 1,
"ms": 3726,
"ok": true,
"passed": 1771,
"failed": 0,
"outcome": "Partial"
},
{
"agent": 2,
"ms": 2955,
"ok": true,
"passed": 1771,
"failed": 0,
"outcome": "Partial"
},
{
"agent": 3,
"ms": 2844,
"ok": true,
"passed": 1771,
"failed": 0,
"outcome": "Partial"
},
{
"agent": 4,
"ms": 3080,
"ok": true,
"passed": 1771,
"failed": 0,
"outcome": "Partial"
}
],
"p50_ms": 3080,
"p95_ms": 3726,
"max_ms": 3726
},
{
"name": "r3",
"wall_ms": 23318,
"cpu_ms": 208171,
"samples": [
{
"agent": 0,
"ms": 22841,
"ok": true,
"passed": 1770,
"failed": 0,
"outcome": "Coalesced"
},
{
"agent": 1,
"ms": 22841,
"ok": true,
"passed": 1770,
"failed": 0,
"outcome": "Coalesced"
},
{
"agent": 2,
"ms": 22841,
"ok": true,
"passed": 1770,
"failed": 0,
"outcome": "Coalesced"
},
{
"agent": 3,
"ms": 23318,
"ok": true,
"passed": 1770,
"failed": 0,
"outcome": "Ran"
},
{
"agent": 4,
"ms": 22841,
"ok": true,
"passed": 1770,
"failed": 0,
"outcome": "Ran"
}
],
"p50_ms": 22841,
"p95_ms": 23318,
"max_ms": 23318
},
{
"name": "r4",
"wall_ms": 55485,
"cpu_ms": 520014,
"samples": [
{
"agent": 0,
"ms": 29476,
"ok": true,
"passed": 1770,
"failed": 0,
"outcome": "Ran"
},
{
"agent": 1,
"ms": 54631,
"ok": true,
"passed": 1770,
"failed": 0,
"outcome": "Ran"
},
{
"agent": 2,
"ms": 55485,
"ok": true,
"passed": 1770,
"failed": 0,
"outcome": "Ran"
},
{
"agent": 3,
"ms": 53579,
"ok": true,
"passed": 1770,
"failed": 0,
"outcome": "Ran"
},
{
"agent": 4,
"ms": 54040,
"ok": true,
"passed": 1770,
"failed": 0,
"outcome": "Ran"
}
],
"p50_ms": 54040,
"p95_ms": 55485,
"max_ms": 55485
}
],
"total_wall_ms": 171392,
"total_cpu_ms": 1730367,
"disk_bytes": 10154437408,
"peak_ram_delta_bytes": 18994118656,
"min_available_ram_bytes": 1557192704,
"priority_agent_ms": 29476,
"engine_stats": {
"requests": 20,
"hits": 0,
"coalesced": 3,
"partial": 5,
"ran": 12,
"units_run": 125,
"units_cached": 45,
"jobs_cancelled": 0,
"cpu_ms": 1730367,
"saved_ms": 0,
"commands": 0
}
}README
throng is a Rust agent harness for running a swarm of coding agents on one repository. Each agent works in its own snapshot. Every build and test they ask for goes through one shared verification engine that caches results by the exact bytes of the files each test depends on, merges identical checks, and only re-runs the test binaries a change can affect. The swarm hands back a change only after the real test suite passed it.
Why it exists: parallel agents usually get one git worktree each, and each worktree builds from cold. In the benchmark here, 5 plain worktrees on a 1,770-test Rust crate took 1,036 s of wall time and ran out of memory, so 2 of 4 rounds failed for reasons unrelated to the code. The same 5 agents on throng took 170 s with every round passing, and 20 agents passed all 4 rounds (docs/bench).
What is in this build:
README.md: what throng does, the three ways in (terminal, desktop app, MCP), how Make better and the measured knowledge base work.
CLAUDE.md: instructions for Claude Code on how to use the throng MCP tools (swarm, wait, result, apply only when asked).
.mcp.json: the MCP server entry.
docs/SAFETY.md: every rule the built-in guard enforces by default (no git push, no network tools, no secret files, keys scrubbed from agent environments).
docs/bench/: the raw benchmark JSON and a summary table.
How to run it:
cd ui && npm install && npm run build && cd ..
cargo build --release -p throng
throng --selftest
claude mcp add throng --scope user -- throng mcpThen cd into a repo and run throng, type a goal, and /apply the verified diff. From Claude Code, ask for a swarm and Claude calls throng_swarm, throng_status and throng_result.
Models: local models through Ollama (tested with qwen2.5-coder 7B and 14B and qwen3-coder 30B), the Anthropic API, any OpenAI-compatible API, or headless Claude Code sessions as workers (provider claude-code, using your own Claude Code login).
What to change: the agent count and build slots to fit your RAM, the model, and the guard policy if your tests need network. On a machine you also use for other work, cap build parallelism (CARGO_BUILD_JOBS=4).
Status: Windows only for now (the job containment uses Windows job objects and a private desktop). The source is not published yet; this build carries the docs, config and benchmark data.