Which BoxLite do I want?
There are two ways to run boxes, and the choice is made for you by one thing: whether the machine running your code has hardware virtualization.Open source — boxes on your own machine
Free, self-hosted, no account. Needs hardware virtualization — KVM on Linux, Apple Silicon on macOS, WSL2 on Windows. Not available in most CI runners, nested VMs, or containers.
BoxLite Cloud — boxes on our machines
An API key and HTTPS is all your machine needs. Works from CI, containers, and locked-down laptops. Same SDK, different runtime handle.
Run your first sandbox
This is the open-source path. For the Cloud path, see the Cloud quickstart.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.
Quickest path for new users
- Pick a track → above. Self-hosted needs virtualization; Cloud does not.
- Run your first box → Quickstart for self-hosted, Cloud quickstart for Cloud.
- Understand what you are operating → Architecture overview, then Box types.
- Build something real → Agent tools for the capabilities, or use cases for end-to-end guides.
- Go to production → Running sandboxes at scale and Error handling.
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
Boxliteruntime: 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 every method must be awaited —box.info()included, on bothSimpleBoxand the nativeBox. - Isolation: microVM-level isolation is on by default; to tighten it further use
BoxOptions(advanced=AdvancedBoxOptions(security=SecurityOptions.maximum())), and to inject credentials useBoxOptions(secrets=[Secret(...)]).

