AI Republic had its Pi Dash platform port its own server code to Rust, with 26 AI agents doing the work for about $350 in model fees. The Pi Dash self-evolution experiment covered roughly 101,000 lines of Python, and the agents merged their own pull requests without anyone signing off.
The main port ran about ten days, from September 26 to October 5, 2026. Pi Dash is an open source platform that assigns tasks to teams of AI agents.
How the Pi Dash experiment worked
Muse Code instances on 5 developer machines did the work, all backed by the muse-spark-1.3-contribute model. Each agent took an issue from the board, wrote the Rust, had it reviewed, checked it against a live Django instance and merged it. The backend started as a fork of Plane’s Django API. By September it held about 101,000 lines of app code and another 20,000 or so of cloud-only code.
A plan came first. Muse Code surveyed the codebase, sized each area, flagged dead code to leave out, and divided the remainder into 10 foundation issues and 37 domain epics. Claude Code checked the plan before work started.
Overall the agents made roughly 166,000 model calls and burned through 48.6 billion tokens, which AI Republic prices at about $350.
The rulebook the agents followed
Every run started by reading one rulebook issue. Its main rules were short:
- Keep behavior identical, from URLs and JSON to the database schema.
- Write code only under the rust-api directory and leave Python files alone.
- Count a task as done only when the named tests pass, with no stubs or skipped tests.
- Assume the code is wrong during review, with two independent passes against the Python.
- Report a rule that can’t be followed rather than working around it.
The first rule pinned down behavior rather than code. Much of what Django does is implicit, hidden in base classes, serializers and lazy querysets, and Rust has no direct counterpart. So for each issue an agent worked out what the Python really did, then wrote fresh Rust to match, using the old code as a spec. Contract tests sent real HTTP requests to both servers to compare.
One rule loosened in late October. From October 26, matching JSON no longer meant matching every byte: business behavior and the API contract had to agree, but quirks of the old libraries that no client could trigger were dropped.
Implement, review, test, merge
Every issue followed one loop, with each stage handled by a separate agent starting from a clean context. The run that wrote the code never reviewed it. A failed review or test sent the issue back to implementation, and a pass went straight to merge.
A scheduled coordinator agent acted as project manager. It freed unblocked issues, re-dispatched stuck runs and reported progress, but never touched code. When CI failed after a merge, it opened a single urgent issue listing the broken tests, and a fix run bisected the merges since the last passing build.
The numbers
- Around 1,740 issues and 1,320 merged pull requests
- 5,029 contract tests, run on both backends, with all HTTP ones passing on Rust
- Some 720,000 net Rust lines landed by October 5, about three quarters of the final total
- No unsafe code, since every crate forbids it
By October 12 the Rust code had reached about 88% of its final size, and the pace then dropped to a few thousand lines a day as work turned to fixes and cleanup. The branch reached main on November 3. The Rust ends up about five times the size of the Python, since it states every query, JSON field and check that Django handles behind the scenes.
Rust against Django in production
Both backends ran on the same host and database, which allowed a direct comparison. On November 18, Rust used about 18 times less memory, though its containers had run three hours against five days for Django. The compressed image is 88.5 MB against 141.1 MB. With 32 requests in flight, Rust handled three times the throughput. Django occupies about 1.5 GB of the host’s 3.8 GB, so the Rust stack could move to a smaller instance.
The Python code is still in the repository. A proxy shifted traffic domain by domain, and Rust now answers every request on pidash.airepublic.com. That is why unsupervised merges were tolerable: a merge altered what got built, while production traffic only moved when routing changed.
What AI Republic wants to fix next
Agent sandboxes ran out of disk during the port. The team cleared them manually, then scripted it. Token use remains heavy because one task often takes several loops, and AI Republic wants agents to handle more of the task management too.
A debugging scheduler now keeps testing the new Rust backend on a schedule. The code is open source on GitHub, and a hosted version runs at pidash.airepublic.com.
Source: airepublic.com