BoxLite
ActiveDescription
Lightweight VM compute substrate for AI agents, running OCI containers inside Boxes, embeddable as a Python library without daemon or root privileges.
Key Features
- Stateful workspaces — Boxes retain packages, files, and environment across stop/restart, avoiding rebuilds
- Lightweight VMs — Small footprint, fast boot, async-first API for high concurrency
- Hardware isolation — Each Box runs its own kernel, not just namespaces or regular containers
- No daemon — Embed as a library, no root or background service required
- OCI compatible — Supports standard Docker images (python:slim, node:alpine, alpine:latest)
- Network and secret policy — Restrict outbound access with allow_net and inject real HTTP(S) secrets from host side
Use Cases
💡 Run isolated AI agent sandboxes locally without root privileges
💡 Maintain stateful working environments for long-running agent tasks
💡 Embed sandbox execution of LLM-generated code in Python applications
💡 Reuse existing container ecosystem via OCI images
💡 Seamlessly migrate agent environments between team laptops and cloud
Strengths & Limitations
✅ Strengths
- • Actively maintained, recent updates
- • High community interest (2.2k stars)
- • Permissive open-source license (Apache-2.0)
⚠️ Limitations
- • High issue backlog (232 open issues)
Categories
Quick Start
# Python install
pip install boxlite
# Run a Box
python3 -c "
import asyncio
import boxlite
async def main():
async with boxlite.SimpleBox(image='python:slim') as box:
result = await box.exec('python', '-c', \"print('Hello from BoxLite!')\")
print(result.stdout)
asyncio.run(main())
"
# Node.js install
npm install @boxlite-ai/boxlite