---
id: "lib-2026-10-09-rewriting-prime-agent-in-rust"
type: "library"
title: "Rewriting Prime Agent in Rust"
lang: "EN"
org: "Prime Intellect"
source_type: "Practitioner post"
date: "2026-10-09"
week: "2026-W41"
url: "https://nosov.ai/library/lib-2026-10-09-rewriting-prime-agent-in-rust/"
original_url: "https://www.primeintellect.ai/blog/prime-agent-rust"
tier: "B"
tier_name: "Useful, limited"
tier_reason: "Detailed engineering post by Prime Intellect with concrete scale and benchmark figures, but the benchmark is the vendor's own and compares its product with competitors."
summary_basis: "full-text"
original_minutes: "12"
tags: ["ai technology", "business transformation", "multi agent orchestration", "verification"]
frames: ["verification-capacity"]
---

# Rewriting Prime Agent in Rust

Tier B (Useful, limited): Detailed engineering post by Prime Intellect with concrete scale and benchmark figures, but the benchmark is the vendor's own and compares its product with competitors.

Summary based on the full text.

## In short

A blog post by Kevin Thomas, Sebastian Müller and Seth Karten of Prime Intellect, published 9 October 2026. It describes how their open-source coding agent, Prime Agent, rewrote itself from TypeScript into Rust over two weeks using a swarm of more than 2,000 agents, then ran a three-day agent loop to improve its own performance. The human work went mainly into building objective parity checks so agents could measure their own progress. The Rust version starts about 14 times faster and uses much less memory than the TypeScript one.

## Key numbers

- 2,209: agents in the swarm, exchanging 16,758 agent-to-agent messages and using 228.70B tokens
- 14.18x: faster cold-start input-ready latency, 736.1 ms in TypeScript vs 51.9 ms in Rust after hillclimbing
- 69+: merged performance changes from 144+ experiment and audit records in a 3-day agent loop
- ~15,000 to ~2,500: lines in the largest source file, TypeScript vs Rust

## What it reports

- Prime Agent, launched in August, has been downloaded more than 300,000 times and processed over 8 trillion tokens.
- The rewrite ran across 10,000+ sandboxes using over 200 billion tokens from the GLM-5.3 endpoint; the dashboard shows 2,209 agents, 16,758 messages and 228.70B tokens in total (192.99B for the implementation, 35.70B for the performance phase).
- Each task moved through four agents: planner, implementer, reviewer (a different model, separate context) and verifier in a fresh sandbox. The root agent wrote no product code.
- Parity was checked four ways: terminal-frame diffs of both binaries, transcript and request diffs, protocol message checks and an agent audit of every component.
- All orchestrators ran on two 8-core CPU nodes, each supporting over 100 concurrent subagents.
- The hillclimbing loop had no numeric target and merged over 69 changes. Cold start went from 736.1 ms to 51.9 ms, large-session memory from 1,130.0 MB to 237.3 MB, installed size from 172.1 MB to 59.6 MB.
- Against other harnesses, first paint was 23.6 ms vs 264.6-1,715.3 ms for Claude Code, Codex CLI, Pi and Hermes Agent.

## How they got it

The team set up differential tests and a benchmark harness on fresh 4-core, 8 GB sandboxes, with noise checks and a scripted model so timings exclude inference. Remaining bugs were found by moving the agents and then the internal team onto the Rust build; humans directed and reviewed the follow-up work over several weeks.

## Limits

- External comparisons use the company's own suite; the authors say that without a common standard they should be read with caution.
- Startup and memory figures exclude inference, which dominates real task time.
- Parity checks only covered exercised behaviour; release quality needed weeks of human-directed follow-up.

## Why it matters for companies

The useful part for a manager is the division of labour: people built the checks, agents did the porting, and separate agents reviewed and verified. Large code migrations become feasible when "done" can be tested automatically against the old system. The token volume - over 200 billion for one rewrite - is a reminder to budget such projects in compute as well as staff time. The startup gains matter less than the method.

Original: https://www.primeintellect.ai/blog/prime-agent-rust
