Agent sessions at 0.8MB RAM each: benchmark shows sandbox-free harness is dirt cheap

mitsuhiko · x · 2026-09-24

Nathan Flurry shares a memory benchmark for agent sessions: running the Pi harness on Rivet Actors instead of per-session sandboxes takes 0.8MB of RAM per active session, starts in tens of milliseconds, and hibernates when idle.

The core insight: sandboxes pay the overhead of a full Node.js process per session — hundreds of MB plus seconds of startup. Running the harness inside your own backend amortizes that fixed cost across hundreds of agents per process; each new session is just a few JS objects. The measured graph shows a 223MB baseline for Node.js + libraries, with each additional session costing only 0.82MB (content-dependent).

The benchmark code is open-sourced in rivet-dev/rivet, measuring retained resident memory (not peak) with responses verified against a mock LLM endpoint.

Original post →

More from coding & agent

coding & agent channel →