← Friday, October 9 deck

05Tooling

Prime Intellect says a swarm of over 2,000 agents rewrote its Prime Agent in Rust, cutting startup memory by 83%

Over two weeks, Prime Agent orchestrated a swarm of over 2,000 agents to rewrite itself in Rust. With 10,000+ sandboxes, 200B+ GLM-5.3 tokens, and 16,000 agent-to-agent messages, this was our largest test yet of Prime Agent’s multi-agent capabilities and our infrastructure powering these agent swarms. Prime Agent now reaches usable input ~13× faster and uses 83% less startup memory than before.

Preview frame from Prime Intellect's video visualizing the agent swarm that rewrote Prime Agent in Rust.
126 replies151 reposts1853 likes

Context

Why it matters

It is one of the largest public examples of an agent swarm rewriting a real codebase, though the speed and memory gains come from Prime Intellect's own benchmark.

Prime Intellect builds infrastructure for AI training, inference and agents, and Prime Agent is its open source coding agent. The company says Prime Agent has been downloaded more than 300,000 times since its August launch. The original version was written in TypeScript.

Deep dive

Prime Intellect says that over two weeks, Prime Agent orchestrated a swarm of more than 2,000 agents to rewrite itself end to end in Rust, using more than 10,000 sandboxes, over 200 billion tokens from its GLM 5.3 endpoint and 16,000 agent to agent messages. It says the rewritten agent reaches usable input about 13 times faster and uses 83% less startup memory.

According to the company's blog, subagents sorted dependencies and used state machines to structure loops and correctness checks, while runtime benchmarks and real traces were used to tune performance and triage bugs. The company says all orchestrators ran on two 8 core CPU nodes, with heavy jobs such as compilation and type checking sent out to its sandboxes.

Magica reported that a root agent divided the work but wrote no product code, with planner, implementer, reviewer and verifier agents handling each task. It also reported the company's benchmark figures: cold time to type falling from 737.8 ms to 55.8 ms and memory from 607.4 MB to 106.0 MB. Magica noted those come from a company designed suite that excludes inference, that the release is a nightly beta, and that an independent full test had not finished.

RuntimeWire reported the rewrite adds Windows support and split the code into nine Rust crates.

What to expect next

Watch for independent tests of the Rust version, since the speed and memory figures come from Prime Intellect's own benchmark and the release is still a beta.

Also watch whether the company publishes more detail on how the swarm was run, such as how many agents worked at once and how much human review was needed. That would show how repeatable this kind of large automated rewrite is for other teams.