Run your first sandbox
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
- Install it → Installation (note the platform and virtualization requirements; the Node package is
@boxlite-ai/boxlite). - Run your first sandbox → pick your language:
- Understand what you are operating → Architecture overview, then Box types.
- Build something real → go to Agent tools (run code / commands / browser / desktop) or the use cases for end-to-end guides.
- Go to production → Running 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
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), andbox.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 useBoxOptions(secrets=[Secret(...)]).

