Prime Agent Rewrites Itself in Rust: 2,000 Agents, 200 Billion Tokens, 14x Faster

Rewriting Prime Agent in Rust

Prime Agent Rewrites Itself in Rust: 2,000 Agents, 200 Billion Tokens, 14x Faster

Prime Intellect rewrote its Prime Agent from TypeScript to Rust using a swarm of over 2,000 autonomous agents across 10,000+ sandboxes, consuming 200 billion tokens from GLM-5.3. The agents achieved feature parity through differential testing and then hillclimbed performance, resulting in 14x faster startup, 80% less memory usage, and a more modular codebase. The rewrite also enabled Windows support and session crash isolation.

Over two weeks, Prime Agent orchestrated a swarm of over 2,000 agents to rewrite itself end to end, operating across 10,000+ Prime Sandboxes with over 200 billion tokens from Prime Inference’s GLM-5.3 endpoint.
  1. AbuAssar

    > Overall, our Rust rewrite and following performance hillclimbing has made Prime Agent significantly faster and more resource efficient. With time to input roughly 14x faster than TypeScript and using over 80% less memory after startup

    very nice outcome of this port

  2. mgreg

    I'm interested in their Planner -> Implementer -> Reviewer -> Verifier process they used for this transition to Rust. I've see similar but curious how they actually implemented this.

    Curious how this could be applied to greenfield coding rather than just making a copy in a new language or performance optimizing.

  3. theturtletalks

    So they used Prime Agent and GLM 5.3 to swarm and rewrite the code in Rust. This also shows Prime Agent doing what it preaches by rebuilding itself. Since Prime Agent is Pi under the hood, will they push a Rust rewrite to Pi? Pi extensions use Typescript so I wonder if they will work.

    I don’t see many people talk about Prime Agent, I always wondered if it could just be a Pi extension cause it seems to be a subagent orchestration agent.

More from this day

2026-10-10