Infinity vs Rui: 1 GB vs 5.2 MB
Updated
divyanshgolyan.com/posts/infinity-vs-rui/
I believe most agents will soon be started by other agents, and they will spend most of their time waiting. In October AWS released Infinity, a runtime built on the same belief. Their pitch: 75,000 agents should fit in the memory of a Raspberry Pi.
I read claims like this for ideas to improve Rui, my agent harness. So I took Infinity’s own benchmark and ran it on Rui.
Where a waiting agent lives
Simplified, a waiting agent is its conversation history and a place in line. Infinity drops everything else between turns and keeps the history in memory. Rui moves the history to disk as well, into SQLite.
Memory for 10,000 idle agents
The benchmark gives every agent 20 turns. Each turn is a user message, a 1.2 KB answer that calls a tool, the tool’s result, and a second answer. Then the agent goes idle. I ran the same turns through Rui on the same kind of machine and measured both with the same metric.
At 10,000 idle agents, Infinity holds 1,052 MB and Rui holds 5.2 MB. Infinity adds 101 KB for every agent, because each agent’s history stays in memory. Rui’s line stays flat, because an idle agent is just rows on disk.
Extend both lines to Infinity’s own target of 75,000 agents. Infinity needs about 7.6 GB, which matches the 8 GB Raspberry Pi in their pitch. Rui still needs about 5.2 MB of memory, plus about 4.8 GB on disk.
The history still exists in Rui. It takes 640 MB on disk, which is cheaper than memory, and it survives a crash. If Infinity’s local process dies, its 10,000 conversations are lost. Infinity’s serverless mode avoids this by keeping history in a database.
What Rui pays for it
Disk is slower than memory, and Rui pays for part of that in CPU. A model call costs Rui 5.5 ms of CPU and Infinity 0.15 ms, so Rui uses about 37 times as much.
Most of that gap is SQLite. Around each call, Rui reads and writes the turn’s state and commits it to disk, so it survives a crash. Building the request is a smaller share, because Rui keeps each active agent’s encoded history in a scratch file and only encodes what’s new. Next, I’m making the SQLite work cheaper without giving up crash safety.
Summary
Infinity and I agree that a waiting agent should cost almost nothing. Infinity keeps an idle agent’s history in memory, and Rui keeps it on disk. Rui pays for that with more CPU per model call, and saves about 100 KB of memory per idle agent.
How I measured
Both ran on 4-core Linux machines in the cloud, in different containers: Infinity from its main branch on 30 October 2026, and Rui release 0.70.0 on 12 November 2026. I did not rerun Infinity; the gaps here are far larger than the difference between two such containers. Infinity ran its own benchmark, agent_scale.rs, with its model and tool inside the same process. Rui ran the same turns against a separate model server over TLS and HTTP/2, and ran each tool call as a real bash command. Every model call completed in both, 400,000 of them for Rui with no errors. I count private memory, the memory only that process uses: the median of 3 runs for Infinity, and one run for Rui. CPU is the process’s own CPU time divided by its model calls: 3 runs of 1,000 agents for Rui, with its Store on a journaled ext4 disk, and 3 runs of 10,000 for Infinity. Rui’s split by part is each part’s share of the Host’s own samples in one perf profile, with SQLite’s fsyncs counted as SQLite.