cs.OSNov 25, 2026

Ambar: Memory Management for Agentic AI Sandboxes at Scale

Authors: Yigit Kemal Can, Pratyush Patel, Neha Gholkar, Hasan Maruf, Apostolos Kokolis, Jovan Stojkovic

Organizations: The University of Texas at Austin · Meta

Abstract

Agentic AI creates growing demand for datacenter CPUs to execute tools inside sandboxes. Our characterization of open-source agentic AI benchmarks and our sandbox workloads shows that memory capacity prevents servers from fully utilizing these CPUs. The cause is a mismatch between CPU and memory demand: sandboxes execute tools in short bursts, then wait for LLM responses or user input while their memory remains stranded. Servers can use these idle periods to colocate more agents and improve datacenter efficiency, but server memory capacity limits the number of agents each can support. To increase effective memory capacity, idle sandboxes can be compressed or moved to slower memory tiers, e.g., CXL or SSDs. However, these operations and later memory restoration consume cycles and delay tool execution. Hence, memory management must increase effective memory capacity while preserving cycles for new agents and avoiding delays when idle agents resume execution. We propose Ambar, an agent-aware memory manager that jointly manages memory tiering and compression to support more concurrent agents per server while limiting execution overhead. Under memory pressure, Ambar decides which sandboxes to move to a slower memory tier, compress, or both. It predicts sandbox idle time and weighs the local memory it frees against the time needed to reclaim and restore its memory before tool execution resumes. To make reclamation practical, Ambar introduces three optimizations: (i) efficient snapshotting with (ii) hot-page tracking to reduce state-preservation work and eagerly restore only the memory that the next tool needs, and (iii) it offloads data movement and compression to hardware accelerators. Compared to conventional frameworks, Ambar increases the number of agents per server by 5.9x and CPU utilization by 5.0x, while limiting agent P99 latency increases by up to 6.3%.

Figures & tables

Explore similar work

Sep 10, 2026

Memory Compression for High-Fanout Agent Sandboxes

High-fanout agent workloads create a growing memory bottleneck because a single task may spawn many concurrent sandbox sessions. Yet these sandboxes are far from independent: they originate from a shared template and execute related trajectories, exposing substantial template-relative and cross-sandbox memory redundancy. Conventional memory compression is poorly matched to this setting in three fundamental dimensions: how to compress, because they fail to exploit similarity across non-identical sandbox pages; what to compress, because they control page-fault overhead through conservative page selection; and when to compress, because compression is either triggered by memory pressure or performed without awareness of agent execution phases. We present AgentZip, the first memory compression system designed specifically for AI-agent sandboxes. AgentZip introduces compression mechanisms that exploit both the template-relative and cross-sandbox redundancy. It broadens the compression scope to any page with a profitable representation and shifts overhead control from compression-time page selection to restore-time prefetching. It further aligns expensive compression with LLM waiting periods to avoid interfering with foreground tool execution. Across LLM training and inference workloads, AgentZip reduces sandbox-owned memory by up to 8.7x, compared with 2.1x for the Linux configuration. Restore prefetching and agent-execution-aware scheduling reduce the slowdown of aggressive compression from as high as 3.1x to 1.40x while retaining nearly all of its memory-saving benefit.
Feb 25, 2026

Pancake: Hierarchical Memory System for Multi-Agent LLM Serving

In this work, we identify and address the core challenges of agentic memory management in LLM serving, where large-scale storage, frequent updates, and multiple coexisting agents jointly introduce complex and high-cost approximate nearest neighbor (ANN) searching problems. We present Pancake, a multi-tier agentic memory system that unifies three key techniques: (i) multi-level index caching for single agents, (ii) coordinated index management across multiple agents, and (iii) collaborative GPU-CPU acceleration. Pancake exposes easy-to-use interface that can be integrated into memory-based agents like Mem-GPT, and is compatible with agentic frameworks such as LangChain and LlamaIndex. Experiments on realistic agent workloads show that Pancake substantially outperforms existing frameworks, achieving more than 4.29x end-to-end throughput improvement.
Jul 27, 2026

SpecBox: Speculative Sandbox Scheduling for Efficient LLM Agent Serving

As LLM agents increasingly rely on the Model Context Protocol (MCP) to invoke isolated external sandboxes, disaggregated sandbox deployment introduces a fundamental tension between resource utilization and interactive tail latency. Persistent long-lived sandbox reservations incur excessive memory overhead at scale, while lazy on-demand instantiation generates severe cold-start penalties that degrade response performance under multi-tenant, multi-turn agent workloads. To resolve this dilemma, we present SpecBox, a runtime built around speculative sandbox preallocation tailored for dynamic LLM agent execution pipelines. At its core, SpecBox implements keyword matching and streaming semantic embedding to enable intent-driven sandbox prewarming, which identifies pending tool execution demands mid-LLM token generation and fully overlaps sandbox bootstrapping with model inference. To extend prewarming windows across sequential agent steps, the framework leverages context-aware stochastic prefetching atop a sandbox dependency graph to probabilistically forecast future sandbox switches ahead of execution. We complement these speculative mechanisms with two orthogonal optimizations: a semantic result cache that prunes redundant repeated sandbox invocations, and a dedicated out-of-band shared-memory transport plane that bypasses conventional network serialization to deliver zero-copy artifact transfers. Evaluated on high-concurrency multi-turn agent traces, our prototype demonstrates that SpecBox cuts P99 end-to-end latency by up to 2.9×2.9\times relative to the on-demand sandbox baseline, while slashing peak memory consumption by 45.9%45.9\% compared to permanently reserved sandbox deployments.