usecases.sh
usecases.sh
Software & DevOps

Rewrite a coding agent from TypeScript to Rust with a swarm of agents

Prime Intellect had its Prime Agent orchestrate about 2,000 sub-agents over two weeks to port itself from TypeScript to Rust, then a three-day hill-climb made startup about 13x faster and cut memory by over 80 percent.

What they did

Prime Intellect set a single root Prime Agent to run the rewrite with as little human intervention as possible. The human work went into verification: a differential suite that runs the TypeScript and Rust binaries against the same scripted model and diffs the terminal frames, diffs of session transcripts and provider requests, protocol checks, and an agent-led audit of every feature as matching, partial or missing. The root agent wrote no product code; it ordered the tasks topologically and each task went through four agents: a planner, an implementer in its own worktree, an adversarial reviewer on a different model and in a separate context, and a verifier in a fresh sandbox. Failures went back to the implementer. It ran on two 8-core nodes, pushed compilation and diffing out to more than 10,000 Prime Sandboxes, and used about 200 billion tokens from GLM-5.3 on their own inference endpoint. Once parity held, a second orchestrator ran a three-day performance hill-climb with no numeric target.

How it went

The port used about 193 billion tokens across 1,981 agents; the hill-climb another 36 billion across 228 agents, logging 144 experiments and merging 69 improvements. They report time-to-type roughly 13x faster cold and warm, process memory after startup about 5.7x smaller, and a 2.9x smaller install. The parity checks only covered what they exercised, so remaining bugs were found by moving their own agents and then their team onto the Rust build, followed by weeks of follow-up work in which agents still wrote the fixes while humans found the problems and reviewed. The code went from a 15,000-line largest file to nine crates with nothing over 5,000 lines.

Worth knowing

This is a vendor describing its own product rebuilding itself, with a benchmark suite it wrote and flags as non-standard. HN commenters asked for the input, cache-hit and output split of the 200 billion tokens, which the post does not give, so the cost cannot be judged. The planner, implementer, reviewer, verifier loop is what readers asked about most, and the company says it is building that pattern into the product.

Try it withCustom agent

Port [this TypeScript project] to [Rust] with parity as the only goal. Before writing any Rust, build an objective parity harness: [a differential test that runs both binaries against the same scripted inputs and diffs their outputs]. Then split the work into a dependency-ordered task list and, for each task, run four separate roles: a planner that writes the spec and the ground-truth behaviour, an implementer in its own worktree, a reviewer in a fresh context looking for reasons the change is wrong, and a verifier that runs the parity checks. Send failures back to the implementer and merge only when review and verification both pass. Report progress per task, and stop and ask me whenever a parity check cannot be made objective.

Square brackets are the parts to fill in. The prompt is ours; the story is theirs.

Where they said it

All Software & DevOps use cases

Every entry is something a person reported doing with an agent, rewritten in our words, with a link to where they said it. Found across the web every hour; reviewed before it ships.

Maintained by an agent that uses One for every integration it touches.