Complete reference for BoxLite APIs, configuration, and error handling.Documentation Index
Fetch the complete documentation index at: https://docs.boxlite.ai/llms.txt
Use this file to discover all available pages before exploring further.
SDK API References
Complete API documentation for each SDK:| SDK | Description |
|---|---|
| Python | Async/sync API, box types, metrics |
| Node.js | TypeScript definitions, box types, CDP endpoints |
| Rust | Core runtime, stream APIs, security options |
| C | FFI bindings, JSON API, callback streaming |
Python SDK
Async and sync APIs, box types, code execution, metrics. Python 3.10+.
Node.js SDK
TypeScript definitions, box types, CDP endpoints for browser automation.
Rust SDK
Core runtime, stream APIs, security options. Native performance.
C SDK
FFI bindings, JSON API, callback streaming for system-level integration.
Quick Reference
Python API
For complete Python API documentation, see Python API Reference. Key Classes:| Class | Description |
|---|---|
Boxlite | Main runtime for creating and managing boxes |
Box | Handle to a running or stopped box |
SimpleBox | Context manager for basic execution |
CodeBox | Specialized box for Python code execution |
BrowserBox | Box configured for browser automation |
ComputerBox | Box with desktop automation capabilities |
InteractiveBox | Box for interactive shell sessions |
Node.js API
For complete Node.js API documentation, see Node.js API Reference. Key Classes:| Class | Description |
|---|---|
SimpleBox | Basic container for command execution |
CodeBox | Python code execution sandbox |
BrowserBox | Browser automation with CDP endpoint |
ComputerBox | Desktop automation (14 methods) |
InteractiveBox | PTY terminal sessions |
Rust API
For complete Rust API documentation, see Rust API Reference. Core Types:C API
For complete C API documentation, see C API Reference. Functions:| Function | Description |
|---|---|
boxlite_runtime_new | Create runtime instance |
boxlite_create_box | Create a new box |
boxlite_execute | Run command with streaming |
boxlite_stop_box | Stop and free box |
SDK Feature Comparison
| Feature | Python | Node.js | Rust | C |
|---|---|---|---|---|
| Async API | Yes | Yes | Yes | Callback-based |
| Sync API | Yes (greenlet) | No | Yes (blocking) | Yes |
| SimpleBox | Yes | Yes | Yes | Yes |
| CodeBox | Yes | Yes | No | No |
| BrowserBox | Yes | Yes | No | No |
| ComputerBox | Yes | Yes | No | No |
| InteractiveBox | Yes | Yes | No | No |
| Streaming I/O | Yes | Yes | Yes | Yes |
| Metrics | Yes | Yes | Yes | Yes |
| Type Safety | Type hints | TypeScript | Native | Manual |
Configuration Reference
For complete BoxOptions parameter documentation, see the SDK-specific pages:- Python BoxOptions —
image,cpus,memory_mib,volumes,ports,env, etc. - Node.js JsBoxOptions — TypeScript interface
- Rust BoxOptions — Struct definition with
RootfsSpec,SecurityOptions, etc. - C JSON Schema — JSON format for
boxlite_create_box()
Runtime Options
home_dir: str
Base directory for BoxLite runtime data.
Default: ~/.boxlite
Override: Set BOXLITE_HOME environment variable
Structure:
Environment Variables
| Variable | Default | Description |
|---|---|---|
BOXLITE_HOME | ~/.boxlite | Override runtime home directory |
RUST_LOG | - | Debug logging level (trace, debug, info, warn, error) |
BOXLITE_TMPDIR | System temp | Override temporary directory |
Error Codes & Handling
For detailed error types and handling patterns, see the SDK-specific error pages:File Formats
QCOW2 Disk Images
BoxLite uses QCOW2 (QEMU Copy-On-Write version 2) for persistent disks. Location:~/.boxlite/boxes/{box-id}/disk.qcow2
Features:
- Thin provisioning (sparse allocation)
- Copy-on-write snapshots
- Compression support
OCI Image Cache
BoxLite caches OCI images at the layer level for fast starts. Location:~/.boxlite/images/
Structure:
Blob-level deduplication across images means shared base layers (e.g.,
python:3.11 and python:3.12) are stored only once.Box Configuration
Box metadata and state are stored as JSON. Location:~/.boxlite/boxes/{box-id}/config.json
Example:
SQLite Databases
BoxLite uses SQLite for metadata persistence. Locations:~/.boxlite/db/boxes.db- Box registry and metadata~/.boxlite/db/images.db- Image cache index

