Prime Agent was rewritten from TypeScript to Rust by orchestrating a large autonomous multi-agent effort to produce a faster, smaller, and more robust runtime. Over two weeks more than 2,000 agents ran across 10,000+ Prime Sandboxes (a recorded session showed 2,209 agents, 16,758 messages, and ~228.7B tokens) to port features, maintain protocol parity, and hillclimb performance. Rust was chosen for native performance, stronger concurrency guarantees, and compile-time safety; the rewrite modularized the code into nine crates, reduced maximal file sizes, added per-session worker isolation and persistence, unified message types in a shared crate, and enabled platform abstractions (including Windows) and catalog-driven model/plugin shipping.
The rewrite was largely autonomous but constrained by objective, automated verification: TUI, harness, protocol and feature parity checks guided work so humans intervened mainly for verification setup and design decisions. A root orchestrator assigned tasks to planner, implementer, reviewer and verifier agents; failed checks looped back until passing. A separate hillclimb loop profiled benchmarks, ran controlled experiments, and merged 69 validated improvements from 144 experiments. Measured gains include cold-start latency dropping from ~736 ms (TS) to ~51.9 ms (Rust after hillclimb), warm-start to ~41.4 ms, large-session RSS shrinking from ~1,130 MB to ~237.3 MB, and installed size to ~59.6 MB.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.