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
Figure 1. Tool time, LLM inference time, and user idle time distributions across open-source workloads and public traces.
Figure 2. Tool and LLM call times of workloads A–H (median, line to P90) and breakdown of task time.
Figure 3. CPU utilization and memory usage distributions.
Figure 4. CPU and memory usage of workloads A–H as a share of the sandbox allocation (median, whisker to P90).
Figure 5. CPU utilization and memory usage when scaling agent density in the server.
Figure 6. Host memory and CPU, requested and in use, as hosts pack more sandboxes.
Figure 7. Disk offload times for containers and VMs.
Figure 8. CXL offload times for containers and VMs.
Figure 9. SWE-agent slowdown relative to DRAM with lazy promotion from disk and with execution from CXL memory.
Figure 10. Fraction of each step’s pages reused from earlier steps, reuse distance in steps, and fraction of dirty pages.
Figure 11. Pages used per step by source, split into pages reused from earlier steps and pages used for the first time.
Figure 12. Sandbox memory breakdown: per-VM host and guest pages in VMs, and process roles in containers.
Figure 13. Compression ratios across workloads and sandbox types with the zstd-1 algorithm.
Figure 14. Median and P99 compression ratios of different algorithms across workloads and sandbox types.
Figure 15. Compression and decompression times across workloads and sandbox types with the zstd-1 algorithm.
Figure 16. Median and P99 (de)compression times of different algorithms across workloads and sandbox types.
Figure 17. Compression ratio and (de)compression times with the IAA accelerator across workloads and sandbox types.
Figure 18. High-level architecture of Ambar.
Figure 19. Hot set tracker overview.
Figure 20. Number of agents admitted per server with each configuration across workloads.
Figure 21. P50 task completion time with each configuration across workloads.
Figure 22. P99 task completion time with each configuration across workloads.
Figure 23. Useful CPU usage, without memory-management overhead, with each configuration across workloads.
Figure 24. Distributions of the reclamation and restoration times of a sandbox with Ambar across workloads.
Figure 25. Number of memory-management operations per mechanism with Ambar across workloads.
Figure 26. P50 task completion time of the single-mechanism configurations with reactive and proactive restoration.
Figure 27. Number of agents admitted and useful CPU utilization with Ambar under different user idle times.
Figure 28. P99 tool execution time per task and useful CPU utilization with Ambar under different LLM inference times.
Figure 29. Total number of memory-management operations under different accuracies of the LLM wait time predictor.
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.
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.
Zhengding Hu, Zaifeng Pan, Prabhleen Kaur +6
Computer Science and Engineering, University of California, San Diego
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× relative to the on-demand sandbox baseline, while slashing peak memory consumption by 45.9% compared to permanently reserved sandbox deployments.
Yihui Zhang, Tianyu Wo, Jinghao Wang +7
Beihang University · University of Leeds · The University of Sydney