High-fanout AI agent workloads create a memory bottleneck because many concurrent sandbox sessions are spawned from a shared template. These sandboxes have substantial template-relative and cross-sandbox memory redundancy, but conventional memory compression fails to exploit it.
AgentZip introduces compression mechanisms that leverage both types of redundancy, broadens compression to any page with a profitable representation, and shifts overhead from compression-time page selection to restore-time prefetching. It also aligns expensive compression with LLM waiting periods to avoid interfering with tool execution.
On LLM training and inference workloads, AgentZip reduces sandbox-owned memory by up to 8.7x, compared to 2.1x for the Linux configuration. Restore prefetching and agent-execution-aware scheduling reduce the slowdown of aggressive compression from 3.1x to 1.40x while retaining nearly all memory savings.