{"slug": "an-embedded-sandbox-shouldn-t-need-a-linux-vm", "title": "An embedded sandbox shouldn't need a Linux VM", "summary": "BoxLite published benchmark results showing its embeddable VM sandbox installs in 8 seconds at 93 MB and runs zero background processes when idle, while E2B Embed requires roughly 45 minutes to install a 10-service Linux stack, consumes 1.1 GB of RAM plus 4 GiB reserved, and occupies about 7.5 GB of disk. On the same MacBook Air (M4, 16 GB, macOS 26.1) running 512 MiB sandboxes, BoxLite measured 1.0 ms p50 command round trips versus E2B Embed's 6.0 ms, and completed 20 of 20 concurrent creates versus 8 of 20 for E2B Embed, whose remaining requests returned HTTP 500. BoxLite, which began on December 8, 2025 as an embeddable VM runtime using KVM on Linux and Hypervisor.framework on macOS, argues the distinction is that its sandbox is a library inside the host process rather than a single-node deployment of a hosted platform.", "body_md": "We started BoxLite with one conviction: a sandbox for AI agents should be a library you import, not a service you call.\n\nBoxLite's first commit, on December 8, 2025, said it in the opening line of the README:\n\nBoxLite is an embeddable virtual machine runtime for secure, isolated execution environments.\n\nIt took SQLite as its model (\"small, fast, reliable\") and defined the property in one line:\n\nEmbeddable No daemon, no root, just a library in your application.\n\nTen months later, the design hasn't changed. Every box is a real virtual machine with its own Linux kernel, isolated in hardware: KVM on Linux, Hypervisor.framework on macOS. The VMM runs as a child of your process. There's nothing else to start.\n\nOn a Mac, that means BoxLite lives right on your Mac. There's no Linux VM to host the sandbox, no Docker Desktop and no background service. Your program starts a box, and when your program exits, the box is gone.\n\nPostgres runs perfectly well on a single machine, and nobody calls it an embedded database. SQLite is embedded because it lives inside your program. There's no server to start, no port, and nothing to operate when your program isn't running.\n\nWe hold the embedded sandbox to the same bar:\n\nPutting a sandbox platform on one machine makes it a smaller deployment, not an embedded one. The test is simple: when your program exits, is anything still running?\n\nAgents don't run in one place. They run on a developer's laptop, inside a test suite, in a CLI someone installed with `pip`, and inside products that ship to customers who will never run your infrastructure. A sandbox that needs its own servers can follow the agent to only some of those places. A library can follow it everywhere.\n\nIsolation shouldn't be the price of that. Agent-generated code is untrusted code, and a shared-kernel container is a different risk class from a VM. BoxLite gives every box its own kernel, so embedding never means weakening the boundary.\n\nThe term has spread this year. In September 2026, E2B launched [E2B Embed](https://e2b.dev/resources/introducing-e2b-embed), which in its own words \"runs the whole E2B stack, every feature included, on a single machine.\" On that machine you run E2B's API, orchestrator, proxy, dashboard, Postgres, Redis, ClickHouse and a log pipeline. The machine has to be Linux with KVM, and on a Mac that means running it inside a Linux VM.\n\nThat's a useful product. It gives a customer a private copy of a hosted platform. By the test above, though, it's a single-node deployment rather than an embedded sandbox. The clearest way to show the difference is to measure it, so we installed both on the same MacBook Air (M4, 16 GB, macOS 26.1) and ran the same workload with 512 MiB sandboxes. Each was installed the way its own documentation describes for a Mac:\n\n`pip install boxlite`.` docker compose up -d --wait`.\n|  | BoxLite | E2B Embed | \n|---|---|---|\n| What you install | a Python package | a Linux VM, Docker, and a 10-service stack | \n| Install | 8 s, 93 MB | ~45 min ( `compose up` alone: 166 s) | \n| Zero to first sandbox | ~15 s | ~45 min | \n| Running with no sandboxes | 0 processes, 0 MB | 10 services, 1.1 GB RAM, plus 4 GiB reserved | \n| Disk after install | 93 MB + images | ~7.5 GB | \n| Command round trip (p50 / p95) | 1.0 / 1.3 ms | 6.0 / 8.7 ms | \n| Resume a stopped sandbox (p50 / p95) | 175 / 178 ms | 292 / 1,255 ms | \n| Create to first command (p50) | 1.1 s | 117 ms | \n| 20 creates at once | 20 of 20 | 8 of 20; the rest return `500` | \n\nThe table follows from the two designs:\n\nIf you want your customer to run a copy of your cloud, E2B Embed does that. If you want the sandbox inside your product, that's what BoxLite was built for.\n\nEach number is the median (p50) or 95th percentile (p95) of repeated runs: 30 creates, 100 commands and 20 resumes per tool. If you get different numbers, especially on bare-metal Linux, [open an issue](https://github.com/boxlite-ai/boxlite/issues) and we'll update this post.\n\nBoxLite ships in two forms that share one SDK and one core API:\n\nMoving between them is a change of endpoint, not a rewrite. When you need a server, we run it for you. You never have to start with one.\n\n```\npip install boxlite\npython\nimport asyncio\nimport boxlite\n\nasync def main():\n    async with boxlite.SimpleBox(image=\"python:slim\") as box:\n        result = await box.exec(\"python\", \"-c\", \"print(2 + 2)\")\n        print(result.stdout)  # \"4\"\n\nasyncio.run(main())\n```\n\n", "url": "https://wpnews.pro/news/an-embedded-sandbox-shouldn-t-need-a-linux-vm", "canonical_source": "https://blog.boxlite.ai/embedded-sandbox-no-linux-vm", "published_at": "2026-10-16 06:36:58.240440+00:00", "updated_at": "2026-10-16 06:37:00.909537+00:00", "lang": "en", "topics": ["ai-agents", "ai-infrastructure", "developer-tools", "ai-safety"], "entities": ["BoxLite", "E2B Embed", "E2B", "SQLite", "KVM", "Hypervisor.framework", "Docker", "Postgres"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/an-embedded-sandbox-shouldn-t-need-a-linux-vm", "markdown": "https://wpnews.pro/news/an-embedded-sandbox-shouldn-t-need-a-linux-vm.md", "text": "https://wpnews.pro/news/an-embedded-sandbox-shouldn-t-need-a-linux-vm.txt", "jsonld": "https://wpnews.pro/news/an-embedded-sandbox-shouldn-t-need-a-linux-vm.jsonld"}}