Skip to main content
The sandbox system runs agent operations (file I/O, shell commands) in isolated environments instead of the host machine. Every Thread is bound to exactly one sandbox for its lifetime — this is an agent’s body.

Provider comparison

Session lifecycle

pause is the default — you keep everything across restarts.

Quick start

1

Configure a provider

Go to Settings → Sandbox in the Web UI. Expand the provider card and fill in the required fields:Set LEON_SANDBOXES_DIR to the sandbox provider config directory. Config is stored as <provider>.json inside that directory.
2

Start a sandboxed thread

In the new conversation view, use the sandbox dropdown in the input area to select your provider. Send your first message — the Thread is now permanently bound to that sandbox.
3

Monitor resources

Go to Resources (sidebar). Live CPU/RAM/disk metrics and a file browser per sandbox runtime.

Provider configuration

Requires Docker on the host. No API key needed.

API key resolution

API keys are resolved in order:
  1. Config file field (e2b.api_key, daytona.api_key, etc.)
  2. Environment variable (E2B_API_KEY, DAYTONA_API_KEY, AGENTBAY_API_KEY)

Sandbox runtime management

Web UI

From Resources:
  • Unified grid of sandbox runtimes across all providers
  • Click a runtime card → detail sheet with metrics and file browser
  • Pause / Resume / Destroy via UI or API

API endpoints

Architecture

Middleware owns policy. The sandbox backend owns I/O. Swapping the backend changes where operations run without touching any middleware logic. When SQLite sandbox storage is enabled, set LEON_SANDBOX_DB_PATH to the sandbox runtime database: