AgentENV
libraryYour notes
The microVM sandbox platform that runs agent environments for Kimi K3's agentic RL training, open-sourced under the kvcache-ai org alongside the K3 launch and developed with partners. The K3 technical report gives the motivation: as agents get more capable they explore aggressively and sometimes attempt reward hacking, and Moonshot's early container-based sandboxes hit kernel panics and deadlocks from unintended agent operations. Hard tasks also need a sandbox close to a real machine, where an agent can mount disks, run containers, even start its own VMs. AgentENV runs each environment as an isolated Firecracker microVM instead, which containers cannot match on either count.
The second design goal is making idle environments cheap, because an agent waiting on model inference can account for as much as 98% of a sandbox's lifetime. Incremental checkpointing saves only the memory pages dirtied since the last checkpoint, giving checkpoint and resume latencies as low as 133 ms and 49 ms; the README quotes snapshot-backed boot or resume under 50 ms and pause under 100 ms. On top of that sit pause/resume, which releases a paused sandbox's CPU and memory entirely, and fork, which clones a running environment's exact state into independent sandboxes for parallel rollouts. Snapshots persist to S3-compatible object storage or a shared distributed filesystem. For scale, OCI images load on demand through overlaybd with local disk as a bounded cache, so the aggregate image and snapshot footprint can exceed local disk by orders of magnitude without pre-warming every host — reaching 1.5 million images in production per the README. I/O runs through ublk with the host page cache shared across storage and memory snapshots, and memory ballooning returns reclaimable guest memory, for a 9.6× memory overcommit ratio in production. Written in Rust under MIT, it needs Linux 6.8+ and KVM (a PVM path covers hosts without it), and had about 3,600 GitHub stars by early October.