What is an embedded microVM runtime? BoxLite, an Apache-2.0 open-source embedded microVM runtime, ships hardware-isolated VM execution as a library dependency inside an application, requiring no background daemon or remote sandbox API. Host code calls BoxliteRuntime directly or through a `boxlite serve` REST server, with each Box spawning in a jailed `boxlite-shim` child process that uses `bwrap` and `seccomp` on Linux and `sandbox-exec` on macOS, connecting to KVM or Apple Silicon's Hypervisor.framework. BoxLite currently runs `libkrun` as its VMM on both platforms and is building a native Rust VMM and pinned Linux kernel to replace it, a replacement that has not yet shipped. An embedded microVM runtime ships hardware-isolated virtual machine execution as a library dependency inside your application, with no background daemon or remote sandbox API required. When your app needs to run untrusted code or agent tools, it calls the library and boots a microVM directly on the host CPU's virtualization layer. If you've ever linked SQLite into a desktop app or added DuckDB to a Python script, the appeal is familiar. One dependency boxlite on Python, @boxlite-ai/boxlite on Node, plus Go, Rust, and C bindings gives your program an isolated sandbox without forcing users to install or babysit another service. Local runs stay on hardware the user already owns. Depending on how an app launches a sandbox, the setup and billing land in a different place. | Architecture | How your app starts a sandbox | Operational trade-off | |---|---|---| | External daemon dockerd or Podman | Sends requests over a local socket to a persistent service | Requires installing and managing a daemon whose containers share a Linux kernel with desktop VM RAM and licensing overhead on macOS | | Remote sandbox API | Calls a managed cloud cluster over HTTPS | Offloads work from the laptop, while adding network round-trips and per-hour or per-second billing plus API key setup to every casual step | | Embedded microVM runtime | Imports a library directly into your host process | Zero daemon and zero root on your own machine, though sandboxes require local virtualization support and stop when the host goes offline | Embedded libraries fit local developer tools and coding agents well because the user's laptop already has virtualization hardware sitting idle. See Embed a microVM sandbox in your agent at zero extra cost https://blog.boxlite.ai/embed-a-microvm-sandbox-in-your-agent-at-zero-extra-cost for how local runs avoid remote sandbox bills. Importing a library into your process doesn't mean trusting the code that runs inside it. You don't want a bug in a sandboxed script reading your agent's file descriptors or grabbing host environment secrets. In BoxLite https://github.com/boxlite-ai/boxlite , an Apache-2.0 open-source embeddable runtime, your host code calls BoxliteRuntime directly without running a daemon or needing root, or talks to it through the boxlite serve REST server such as boxlite serve :8100 . Local runtime state lives under ~/.boxlite , storing QCOW2 disks, shared directories, cached OCI image layers, and a SQLite box metadata database. Every Box spawns inside its own jailed boxlite-shim child process. On Linux, the jailer wraps boxlite-shim with bwrap and seccomp . On macOS, it uses sandbox-exec . Inside that shim, the Virtual Machine Monitor VMM connects to KVM on Linux or Hypervisor.framework on Apple Silicon, with gvproxy handling networking and virtio-net , virtio-blk , and virtio-fs carrying I/O. Inside the microVM, boxlite-guest runs a gRPC server over vsock and executes OCI container workloads through libcontainer . Each Box boots its own guest kernel. Today, BoxLite runs libkrun as its VMM inside boxlite-shim on both Linux KVM and Apple Silicon Hypervisor.framework . BoxLite is also actively building a native Rust VMM and a pinned Linux kernel in public to replace libkrun , covered in Building a VMM from scratch, 0: Why BoxLite is replacing libkrun https://blog.boxlite.ai/building-a-vmm-from-scratch-0-why-boxlite-is-replacing-libkrun . That custom VMM is still in development and hasn't shipped as a replacement for libkrun . Moving off libkrun removes libkrunfw dlopen fragility and breaks the IrqsExhausted multi-volume limit while giving Boxes clean exit codes. It also unlocks hot-plug mounts, live resizing, memory snapshots, and GPUs. Running a sandbox inside your host process works well on a developer laptop, since there's no daemon to manage and no usage meter ticking on casual local steps. Once an agent moves onto a server backend or needs to stay online after someone closes their laptop lid, local execution stops fitting. BoxLite splits its open-source runtime from BoxLite Cloud https://blog.boxlite.ai/one-sdk-one-microvm-runtime-from-laptop-to-boxlite-cloud along that exact boundary. With the open-source runtime, you run and manage the host infrastructure yourself, either embedded inside your app via Boxlite.default or self-hosted on your own servers via boxlite serve . BoxLite Cloud is the managed isolated compute environment: BoxLite runs the infrastructure so AI agents can run code, use tools, keep state, and publish apps as services without you self-hosting the runtime. Switching between Boxlite.default and Boxlite.rest BoxliteRestOptions.from env keeps your box and tool lifecycle code intact, though local and remote hosts still differ in where files live and how compute scales. Local microVMs depend on hardware virtualization from the host. Linux needs /dev/kvm , Windows needs WSL2 with KVM enabled, and macOS requires Apple Silicon with Hypervisor.framework . Hosts without those interfaces can't boot a microVM locally. The first Box launch also waits on the network to pull your OCI base image. Later runs skip that download by reusing cached image layers stored under ~/.boxlite . Once a workload needs server uptime or outgrows a single machine's memory and CPU, moving from Boxlite.default to Boxlite.rest BoxliteRestOptions.from env lets you point the same Box lifecycle code at self-hosted boxlite serve or BoxLite Cloud.