AI Briefing
KOSign in

Prime Agent Rewrites Itself in Rust with 14x Faster Startup and Over 80% Less Memory

·2026.10.09 09:00

Key point

Prime Agent autonomously rewrote itself in Rust using a swarm of 2,000+ agents, achieving 14x faster startup times and over 80% less memory usage compared to its TypeScript version.

1 / 2

Details

Prime Intellect has released a Rust rewrite of Prime Agent, its open-source coding agent harness. Since its August launch, the original TypeScript version was downloaded over 300,000 times and processed 8 trillion tokens. The rewrite was orchestrated by Prime Agent itself, utilizing a swarm of 2,000+ agents across 10,000+ Prime Sandboxes and consuming over 200 billion tokens via GLM-5.3 inference endpoints. The process took place over two weeks and focused on maintaining feature parity while improving performance and reliability.

Performance Gains

The Rust implementation demonstrates significant improvements over the TypeScript version and other major coding agents like Claude Code v2.1.289 and Codex CLI v0.160.0:

  • Cold Start: Input-ready latency is 14.18× faster (51.9 ms vs. 736.1 ms in TS).
  • Warm Start: Input-ready latency is 13.34× faster (41.4 ms vs. 552.3 ms in TS).
  • Memory Usage: Whole process-tree RSS after startup is 5.73× smaller (106.0 MB vs. 607.4 MB in TS), representing over 80% less memory usage. For a 10 MiB session, process-tree RSS is 4.76× smaller (237.3 MB vs. 1,130.0 MB in TS).
  • Installed Size: 2.89× smaller (59.6 MB vs. 172.1 MB in TS).

These gains were achieved through a "hillclimbing" optimization loop where agents profiled benchmarks and merged over 69 valid changes over three days, focusing on moving work off startup paths, replacing polling with event-driven waits, and optimizing memory release.

Autonomous Rewrite Process

The rewrite was managed by a root agent that orchestrated a factory of finite state machines, dividing tasks into a topological order. Each task moved through four specialized agents:

  • Planner: Created specifications and parity checks.
  • Implementer: Wrote Rust code in parallel worktrees.
  • Reviewer: Adversarially inspected PRs using a different model.
  • Verifier: Ran parity checks in fresh sandboxes.

Parity was ensured through differential testing of TUI frames, session transcripts, and daemon protocols. The new architecture is modularized into nine crates, with the largest source file reduced from ~15,000 lines to ~2,500 lines.

Availability and Features

Prime Agent is now available with native Windows support (beta) and installation via homebrew. The project remains open source and can be installed with a single command. Prime Intellect plans to further integrate Prime Agent with its ecosystem, including cloud agent swarms, inference, and evaluation tools.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.