Skip to main content
You’ve installed BoxLite and run “Hello from BoxLite!” — now what? These tutorials walk you through the most common tasks, with working code you can copy and adapt.

Which box type should I use?

I want to…UseTutorial
Run Claude Code in a sandboxSimpleBoxClaude Code
Run a shell command in isolationSimpleBoxQuick Start
Execute AI-generated Python codeCodeBoxExecute AI-generated code
Upload and download filesSimpleBox or CodeBoxUpload & download files
Connect an LLM to a sandboxCodeBoxConnect to an LLM
Automate a browserBrowserBoxAutomate a browser
Control a full desktopComputerBoxAutomate a desktop
Run an interactive shell sessionInteractiveBoxInteractive terminal
Run Node.js, Go, Rust, or any toolSimpleBoxRun any language
Run a server and access it from hostSimpleBoxLong-running services
Handle errors and debug failuresAllError handling
Not sure? Start with CodeBox — it handles the most common AI agent use case (running untrusted code) and auto-installs packages for you. See Core concepts for a full explanation of each box type.

All tutorials

Run Claude Code in a sandbox

Run Anthropic’s Claude Code agent inside an isolated VM for safe, autonomous code generation and execution.

Execute AI-generated code

Create a CodeBox, run untrusted Python code, auto-install packages, and get output safely. Python and Node.js examples.

Upload & download files

Move files in and out of a sandbox using copy_in/copy_out, volume mounts, or inline base64. Three methods compared.

Connect to an LLM

Give any LLM the ability to execute code inside a BoxLite sandbox via tool calling. Examples for OpenAI, Anthropic, and Vercel AI SDK.

Automate a browser

Launch a BrowserBox, connect via Chrome DevTools Protocol, take a screenshot, and scrape a page with Puppeteer or Playwright.

Automate a desktop

Launch a ComputerBox with a full GUI desktop, control the mouse and keyboard, and take screenshots.

Interactive terminal

Launch an InteractiveBox with PTY support, run shell sessions, and connect to REPLs.

Run any language or tool

Use SimpleBox with custom images to run Node.js, shell scripts, or any CLI tool — not just Python.

Run services with port forwarding

Start HTTP servers and JSON APIs inside a sandbox, forward ports, and access them from the host.

Handle errors and debug

Check exit codes, catch exceptions, handle timeouts, and stream stderr in real time.

What’s next?

Once you’ve worked through these tutorials, dive into the Guides for advanced patterns like concurrency, timeout handling, security configuration, and production deployment.