WhoBuilt

From fork() to Fleet: Designing an Agent Sandbox Cloud

Jul 13, 2026· 45 min· 86K views·Watch on YouTube

Speaker

Abhishek Bhardwaj, who works on reinforcement learning and agent infrastructure at OpenAI, explains how to design secure, persistent sandbox infrastructure for AI agents at an AI Engineer talk.

Why agents need sandboxes

Bhardwaj explains that models can use code execution to solve problems with verifiable answers, such as math and coding tasks. Because generated code may be unsafe or overzealous, it needs an isolated environment that protects the host and other users’ data.

Choosing a runtime security boundary

Forking processes is fast but leaves the host exposed and allows a runaway process to consume node resources. Containers add namespaces, cgroups, and optional seccomp filtering, but still share the host kernel; gVisor moves many system calls to a user-space kernel, while microVMs use hardware virtualization to isolate a guest kernel from the host. Bhardwaj recommends starting with microVMs when a workload needs a full Linux environment, while noting their performance, memory, and GPU trade-offs.

Persisting sandbox state

Bhardwaj argues that agents need durable disks so long tasks survive node failures and can resume elsewhere. Snapshots can support recovery, long-running work, and branching searches; at scale, they should be incremental, fast to create, and fast to restore. One explicit-save design uses copy-on-write layers, identifies changed disk blocks, and uploads them as a snapshot artifact.

Orchestrating sandboxes across a fleet

A control plane can select a region and cluster, then a scheduler can choose a node based on load, health, and snapshot data already present. To reduce startup latency, operators can use warm pools, restore from microVM memory snapshots, or combine the two. Routing a restore to a node with more of the snapshot layers can reduce download work.

Takeaways

  • Treat generated code as untrusted, even when it is intended to help the user.
  • Choose the isolation boundary based on the workload; a full Linux environment may call for a microVM.
  • Make disk snapshots incremental and quick to restore so long-running work can recover from failures.
  • Use snapshot location as a scheduling signal to reduce restore time.
  • Balance startup latency against the compute and memory cost of keeping sandboxes warm.

Mentioned in this talk

Search inside this talk

What was claimed 11

  • built
    “infrastructure that helps run untrusted code ... as part of ChatGPT and Codex web”
    YouTube
    Verified26 sources· Talk, GitHub, Job posting, Web· archived
  • built
    “developing Claude and ChatGPT products”
    0:17inCreating Agents that Co-CreateYouTube
    Verified27 sources· Talk, Job posting, Web· archived
  • works at
    Member of Technical Staff, RL & Agent Infrastructure
    “I'm on the RL and agent infrastructure team at OpenAI.”
    YouTube
    Verified2 sources· Talk, Web· archived
  • feature
    Linux containers: Use namespaces for resource isolation and cgroups to control process resource consumption
    “Namespaces provide resource isolation, and cgroups control how many resources a set of processes can consume.”
    YouTube
    Unverified1 source· Talk
  • feature
    gvisor: Implements many system calls in user space
    “It implements many system calls in user space”
    YouTube
    Unverified1 source· Talk
  • feature
    microVM: Hardware-level isolation separates the guest kernel from the host
    “even if you get root or execute in ring zero in the guest, your host is still protected”
    YouTube
    Unverified1 source· Talk
  • uses
    QEMU uses KVM
    “QEMU and other VMMs have one job: to talk to /dev/kvm.”
    YouTube
    Unverified1 source· Talk
  • feature
    microVM: Smaller memory footprint and faster boot from supporting fewer devices
    “These new Rust-based VMMs have a much smaller memory footprint ... and they boot much faster”
    YouTube
    Unverified1 source· Talk
Show all 11 facts

Related talks