Skip to main content
BoxLite runs arbitrary code, commands, browsers, desktops, or entire AI agents inside hardware-isolated microVM sandboxes that start in about a second — in a few lines of code, and safe enough to hand directly to untrusted LLM output.

Run your first sandbox

Other languages: Node.js · Rust · Go · C. Full prerequisites, the CLI, and offline installs: Installation.

Who this documentation is for

  • AI / agent engineers: you need to give an LLM a secure sandbox that can run code, open a browser, and operate a desktop, without exposing the host to model-generated commands.
  • Backend / platform engineers: you need to start, reuse, and reclaim isolated execution environments on demand inside your own service (multi-tenant, CI, code grading, untrusted third-party code).
  • Agent product authors: you already have a demo and want to turn it into a concurrency-safe, observable, cleanable production service.
Want to run something right now? Start with Run your first sandbox above.

Quickest path for new users

  1. Install itInstallation (note the platform and virtualization requirements; the Node package is @boxlite-ai/boxlite).
  2. Run your first sandbox → pick your language:
  3. Understand what you are operatingArchitecture overview, then Box types.
  4. Build something real → go to Agent tools (run code / commands / browser / desktop) or the use cases for end-to-end guides.
  5. Go to productionRunning sandboxes at scale and Error handling.
Environment prerequisite: BoxLite depends on hardware virtualization. Linux requires KVM; macOS runs through its built-in microVM / virtualization stack. Startup fails in environments without virtualization support (such as some nested VMs or CI runners) — see the Troubleshooting section on each page and Debug macOS Seatbelt denials.

Where everything lives

One row per section. The sidebar lists every page; this table is for deciding which section you need.

Key mental model (three sentences)

  • The Boxlite runtime: a synchronous context manager that creates / queries / reuses / reclaims a set of boxes (get / get_or_create / list_info / remove(id_or_name, force=False) / metrics / shutdown / close).
  • A Box: each sandbox is an async context manager (SimpleBox / CodeBox / BrowserBox / ComputerBox / InteractiveBox / SkillBox), and box.info() is a synchronous call.
  • Isolation: microVM-level isolation is on by default; to tighten it further use BoxOptions(advanced=AdvancedBoxOptions(security=SecurityOptions.maximum())), and to inject credentials use BoxOptions(secrets=[Secret(...)]).