Grafy News
Try Grafy free

Readie Introduces Learned Snapshots to Slash AI Agent Sandbox Latency

Readie, a new system from university researchers, uses learned startup snapshots to cut code‑sandbox startup time by up to 22×.

Illustration for the news story: Readie Introduces Learned Snapshots to Slash AI Agent Sandbox LatencySource: Grafy Research Lab

What is Readie and why does it matter?

Readie is a research prototype that creates learned startup snapshots for code sandboxes used by AI agents. According to the authors (Sivaraman et al., 2026), AI agents frequently generate and run code – from data‑analysis scripts to image‑processing pipelines – and the time it takes to spin up an execution environment directly impacts task completion speed. By reducing sandbox startup latency, Readie promises faster, more interactive agents that can respond in near‑real time.

How do current code sandboxes cause latency?

Existing sandbox services – such as Modal, E2B, or cloud‑run platforms – rely on either (i) custom container images built per request, (ii) per‑request snapshots, or (iii) a monolithic "fat" image that contains a broad set of libraries. All three approaches share a core problem: the required Python packages, datasets, or binary artifacts are not known ahead of time, so the sandbox must download or install them during startup. The paper reports three empirical findings:

  1. Package unpredictability – In a study of 6,833 agent sessions, 30.8 % of sessions imported new packages after the first turn, showing that early‑stage snapshots often miss later dependencies.
  2. Download overhead – When only a base image is cached, fetching missing packages at request time adds significant latency (see Figure 3a in the paper).
  3. Fat‑image slowdown – Even a pre‑loaded fat image incurs slower start‑up because artifacts are read from disk rather than from an in‑memory snapshot (Figure 3b).

These factors make the cold‑start cost a bottleneck for agents that need to execute many short scripts quickly.

What are learned startup snapshots?

The key insight behind Readie is that a single snapshot cannot be both compact and cover the diverse needs of agent‑generated code. Instead, a set of small snapshots – each a few tens of megabytes – can collectively provide high coverage. Each snapshot contains a curated subset of packages and data that are likely to co‑occur in real workloads. When a new script arrives, Readie selects the smallest snapshot that already includes most of the required artifacts, minimizing the amount of additional import time.

The authors formulate snapshot construction as an optimization problem that minimizes expected startup cost under a storage budget. The objective accounts for the actual load time of each artifact and their dependency relationships. Because solving the exact problem is computationally expensive, they employ an approximation algorithm that yields a near‑optimal snapshot set.

How does Readie build and select snapshots?

Readie's workflow consists of three stages (see Figure 1 in the paper):

  1. Metadata generation – A large training corpus of 15 K public and LLM‑synthesized scripts is analyzed to extract package import lists and their import costs.
  2. Snapshot optimization – Using the cost‑aware formulation, the system computes a set of snapshots that together cover the majority of the workload while staying within a predefined storage budget.
  3. Request handling – For each incoming script, Readie evaluates a cost function for every snapshot, picks the one with the lowest estimated startup time, clones an isolated container from that snapshot, runs the code, and finally destroys the container.

Because the snapshots are learned from actual usage patterns, developers do not need to anticipate which packages their agents will need; the system adapts automatically.

What performance gains does Readie show?

In the authors' evaluation on the 15 K‑script benchmark, Readie achieved:

  • Startup latency reduction of 3–22 times\\times compared with existing approaches that use custom images, custom snapshots, or a shared fat image, while keeping the same storage budget.
  • End‑to‑end runtime improvement of 1.3–3.3 times\\times, reflecting both faster container launch and reduced on‑the‑fly package installation.

These gains were measured across a variety of workloads, including data‑science tasks (pandas, NumPy), image processing (Pillow), and web‑scraping utilities. The results demonstrate that learned snapshots can dramatically accelerate the execution loop of AI agents without sacrificing isolation or security.

How can Grafy users apply Readie's ideas?

While Readie itself is a research prototype, its concepts map cleanly onto Grafy’s Code app (/code). Developers building AI‑driven agents in Grafy can:

  • Leverage pre‑built lightweight Docker bases that contain a core set of common packages (e.g., NumPy, pandas). These act as the “fat image” layer.
  • Create multiple targeted snapshots by installing additional libraries that frequently appear together in their own projects. Grafy Code lets you clone a container, install a set of packages, and then export the resulting image for reuse.
  • Automate snapshot selection with a simple script that parses the incoming agent code, extracts import statements, and chooses the smallest matching snapshot stored in Grafy’s Files workspace. This mirrors Readie’s cost‑function selection without needing the full optimization algorithm.

If you prefer not to manage snapshots manually, you can explore the underlying research with Grafy Reader (/reader), which lets you upload the arXiv PDF, ask natural‑language questions about the methodology, and retrieve specific sections.


Source: https://arxiv.org/abs/2611.22171

Frequently asked questions

How does Readie differ from a single fat image approach?

A fat image bundles many packages together, but loading it still requires reading all artifacts from disk, which is slower than restoring a memory‑state snapshot. Readie instead uses several small snapshots, each pre‑loaded in memory, so only the needed subset is cloned, drastically cutting start‑up time.

Can Readie's snapshot optimization be used for languages other than Python?

The paper focuses on Python because most AI‑agent workloads rely on it, but the underlying optimization – modeling artifact load cost and dependency overlap – is language‑agnostic. Adapting the technique to other runtimes (e.g., Node.js or Java) would require building a comparable metadata set of packages and their import costs.

What storage budget does Readie assume, and how does it affect performance?

Readie operates under a fixed storage budget comparable to that of existing sandbox solutions. Within that limit, the approximation algorithm selects a snapshot set that balances size and coverage. The reported 3–22 times\\times speedup holds for the same budget, showing that smarter snapshot composition, not extra storage, drives the gains.


Source: Grafy Research Lab — Readie: Low-Latency Code Sandboxes for AI Agents