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
# Using throng from Claude Code
throng is registered as an MCP server (see .mcp.json, or run `claude mcp add throng --scope user -- throng mcp`). It runs swarms of coding agents on a repo and verifies every result with the repo's real build and tests.
## Typical flow
1. `throng_swarm` with the repo path and a goal ("make every test in tests/stats.rs pass"). Pick the agent count and model.
2. `throng_status` with `wait_seconds` to block until it finishes, instead of polling.
3. `throng_result` for the final status, the engine's verification and the full patch.
4. `throng_apply` only if the user wants the change. It refuses if the files it touches were edited since the swarm started.
## Other tools
- `throng_verify`: run the repo's tests through the cached engine. Useful on its own: it answers instantly for code it has already seen and re-runs only the test binaries a change can affect. Use it instead of a cold `cargo test` when several agents are checking the same code.
- `throng_improve`: rounds of plan, work, verify, reflect. `ambition` is fix, grow or both.
- `throng_knowledge`: what earlier swarms learned about this repo, with each lesson's measured effect.
- `throng_agent`: one agent's full transcript. `throng_stop`, `throng_env`: stop a swarm; see what this machine has.
## Rules
- Never apply a result the user did not ask for.
- A swarm result is only "done" when `throng_result` shows the engine verified it. Report the pass count, not the agents' own claims.
- If a check fails, read the failing test names and output from the result before retrying with a narrower goal.
- On a machine someone is also using (games, video), cap build parallelism (for Rust: `CARGO_BUILD_JOBS=4`) and keep agent counts low.
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.