Installation
- Python 3.10 or later
- pip 20.0+
Basic Execution
What’s happening:- BoxLite pulls the
python:slimOCI image (first run only) - Creates a lightweight VM with the image
- Executes the Python command inside the VM
- Streams output back to your application
- Automatically cleans up when the context exits
Code Execution (AI Agents)
What’s happening:- CodeBox automatically installs required packages (requests)
- Executes the code in complete isolation
- Returns the output
- Your host system remains completely safe
Running Examples
BoxLite includes 9 comprehensive Python examples:| # | Example | Description |
|---|---|---|
| 1 | simplebox_example.py | Foundation patterns |
| 2 | codebox_example.py | AI code execution |
| 3 | browserbox_example.py | Browser automation |
| 4 | computerbox_example.py | Desktop automation |
| 5 | lifecycle_example.py | Box lifecycle management |
| 6 | list_boxes_example.py | Runtime introspection |
| 7 | cross_process_example.py | Multi-process operations |
| 8 | interactivebox_example.py | Interactive shells |
| 9 | native_example.py | Low-level Rust API |