
Prime Intellect Rewrites Prime Agent in Rust, Cutting Cold Start to 52 Milliseconds
Prime Intellect has rewritten its Prime Agent coding harness from TypeScript in Rust, using over 2,000 agents to port the codebase. The result is a 14x faster cold start, 80% less memory, and native Windows support.
Agents Rewriting Agents
Prime Intellect has shipped a complete rewrite of its Prime Agent coding harness in Rust. Since launching in August, Prime Agent has been downloaded more than 300,000 times and processed over 8 trillion tokens. The rewrite was performed largely by Prime Agent itself: over two weeks, a swarm of more than 2,000 agents ported the codebase end to end, operating across more than 10,000 Prime Sandboxes and consuming over 200 billion tokens from Prime Inference's GLM-5.3 endpoint.
The Rust implementation phase used 192.99 billion tokens across 1,981 agents, followed by a performance hillclimb that consumed 35.70 billion tokens across 228 agents. At its peak, the effort involved 2,209 agents exchanging 16,758 agent-to-agent messages and processing 228.70 billion total tokens.
Why Rust
The team said TypeScript helped ship Prime Agent quickly, but its optional types disappear at runtime, errors travel as unchecked exceptions, and CPU-heavy work competes with keyboard input on a single event loop. Rust addresses these issues: native code without a garbage collector accounts for most of the memory and startup gains, the Send and Sync traits let the compiler check which data can move between threads, and exhaustive enums, ownership and lifetimes rule out whole classes of bugs before the code runs. Clippy's pedantic lints add hundreds more checks, which matters when agents write most of the code.
Architecture and Parity
The rewrite also restructured the codebase into nine crates with a one-way dependency graph enforced by Cargo. The largest source file is now about 2,500 lines, down from about 15,000 in TypeScript, and no file exceeds 5,000 lines, compared with four in the original. The team added Windows support, session crash isolation, and a more consistent daemon protocol, with each session running in its own worker process under a small supervisor.
To ensure feature parity, the agents ran four kinds of checks: TUI parity tests that diff terminal frames between the TypeScript and Rust binaries, harness parity tests that compare session transcripts and model requests, protocol parity checks on all daemon message types, and component-by-component feature audits. Each task moved through four agents: a Planner, an Implementer, a Reviewer using a different model in a separate context, and a Verifier that ran parity checks in a fresh sandbox.
Performance Results
A three-day hillclimbing loop logged over 144 experiment and audit records and merged more than 69 valid changes. Cold start input-ready latency dropped from 736.1 ms to 51.9 ms, a 14.18x improvement, while warm start latency fell from 552.3 ms to 41.4 ms. Large-session memory usage fell from 1,130.0 MB to 237.3 MB, and installed size dropped from 172.1 MB to 59.6 MB. Against external harnesses, Prime Agent Rust reached first paint in 23.6 ms and time to type in 55.8 ms cold, compared with 722.8 ms and 737.8 ms for the TypeScript version.
What's Next
Prime Agent remains open source and installs with one command, and the rewrite ships with native Windows support in beta and installation through Homebrew. Prime Intellect says it is now accelerating on capabilities and evals, making the multi-agent workflows behind the rewrite available to users, and tightening integration with the Prime Intellect ecosystem, including cloud agent swarms, inference, traces, sandboxes, evals, and hosted training. The company is also hiring.
Sources: primeintellect.ai
SiTech — AI-powered web development
We build fast, modern websites and bring AI into real business workflows. Have a project or a question? We'd love to help.