MicroVM vs container for agents? BoxLite, an Apache-2.0 open-source embeddable microVM runtime, gives each AI agent sandbox its own guest kernel via KVM on Linux/WSL2 or Hypervisor.framework on Apple Silicon macOS 12+, rather than sharing the host Linux kernel as standard OCI containers do. BoxLite's authors argue that containers relying on namespaces, cgroups and Seccomp leave kernel-escape exposure when a model executes untrusted code, and that BoxLite boots a Box from a cached OCI image within seconds, close to docker run, with no external daemon and no root privileges. The runtime pairs each microVM with a jailed boxlite-shim child process — bwrap, namespaces, chroot/pivot_root, Seccomp BPF and cgroups v2 on Linux; Seatbelt and rlimits on macOS — and lets operators cut outbound traffic with NetworkSpec(mode="disabled"). You want an AI agent to write and run untrusted code without putting your host machine or API keys at risk. Standard containers share one Linux kernel with the host, while hardware microVMs give each sandbox its own guest kernel. Pick plain containers for trusted internal services, and use a microVM whenever a model executes untrusted code. Most teams start with docker run because Docker is already on developer laptops and packages dependencies cleanly in OCI images. That setup holds up well for backend services your team wrote and reviewed ahead of time. Once an agent starts generating commands against external repositories at runtime, process isolation and hardware virtualization behave very differently. A standard Linux container separates filesystem views and process trees using namespaces, cgroups , and Seccomp. Every syscall inside that container still goes to the same host Linux kernel shared with your machine and any sibling containers. A microVM places CPU hardware virtualization KVM on Linux or Hypervisor.framework on Apple Silicon macOS between the workload and the host OS. Each sandbox boots its own guest kernel, keeping untrusted agent syscalls inside that virtual machine boundary. | Dimension | Standard OCI container | Hardware microVM | |---|---|---| | Kernel boundary | Shared host Linux kernel | Dedicated guest kernel per sandbox | | Isolation mechanism | Namespaces, cgroups , Seccomp | Hardware virtualization KVM / Hypervisor.framework | | Escape surface | Shared host kernel syscalls | Hypervisor boundary and virtual devices | | Daemon model | Usually requires dockerd or a runtime daemon | Daemon-backed or embedded as a library as in BoxLite | | Packaging format | Standard OCI images | Standard OCI images inside the microVM | | Best fit | Trusted services and internal builds | Untrusted LLM code and YOLO coding workflows | In Why do AI agents need a sandbox? https://blog.boxlite.ai/why-do-ai-agents-need-a-sandbox , we compared bare-host app hooks, standard OCI containers, and microVMs. Bare-host hooks leave an agent running directly alongside your host files. Plain containers separate the filesystem view, yet they leave real exposure when the code isn't trusted. Kernel-escape bugs are the main technical issue. If model-generated code triggers a Linux kernel bug or slips past a permissive container flag, there's no second kernel boundary stopping it from reaching the host. On macOS, plain containers add operational drag too. Docker requires a persistent background Linux VM through Docker Desktop, which consumes memory and carries licensing costs for commercial teams. Every container on that Mac still shares that single Linux VM kernel. You still use standard OCI images when you move a workload into a microVM. BoxLite https://github.com/boxlite-ai/boxlite is an Apache-2.0 open-source embeddable microVM runtime that you run and manage yourself, with no external daemon and no root privileges. You pull standard OCI images, and BoxLite boots each sandbox called a Box inside its own hardware-isolated microVM. It runs on Apple Silicon macOS 12+ via Hypervisor.framework , or on Linux and WSL2 via KVM /dev/kvm . Once the OCI image is cached locally, a Box boots within seconds, close to docker run . A separate guest kernel doesn't protect secrets you hand straight to the sandbox if outbound traffic stays open. As covered in our YOLO coding-agent guide https://blog.boxlite.ai/run-a-coding-agent-in-a-microvm-before-enabling-yolo-mode , BoxLite pairs the microVM with a jailed boxlite-shim child process per Box. On Linux, that jailer wraps boxlite-shim with bwrap , namespaces, chroot / pivot root , Seccomp BPF, and cgroups v2 . On macOS, it applies Seatbelt /usr/bin/sandbox-exec with deny default and rlimits . Network rules and credentials stay on the host side too. You can cut off outbound traffic with NetworkSpec mode="disabled" , or use NetworkSpec mode="enabled", allow net= ... with a DNS sinkhole to 0.0.0.0 and TLS SNI / HTTP Host inspection. Real keys sit behind a