Sandboxes is in Beta, please request access here.
Your feedback is welcome, please send it to contree@nebius.com or Discord.
See Limits, retention, and usage before planning a workload.
Your feedback is welcome, please send it to contree@nebius.com or Discord.
See Limits, retention, and usage before planning a workload.
When to use Sandboxes
- Give agents a place to act. Run generated code and command-line tools as part of an agent task. Return output and files so the agent can decide what to do next.
- Test and evaluate code. Run checks on proposed changes or evaluation cases in a controlled environment, then use the results to decide whether the work meets your criteria.
- Process data and produce files. Execute scripts that transform input files, compute results, or generate artifacts for your application to retrieve.
Get started
Start with Python
Write a file, save a checkpoint, and read it after the VM restarts.
Start with the CLI
Run the same save-and-reuse workflow from a terminal.
How execution works
An operation starts fresh compute from an image and returns output and process results. Regular Python SDK sessions and CLI runs use an operation per command. The default Python SDK lazy session runs several commands inside one operation until it saves a checkpoint. An image supplies the starting filesystem, including the tools, dependencies, and input files prepared for the task. Choose whether to save changed files as an image for the next run. The Inspect API lets you list, read, and download files from an image without starting a VM. Use it to check inputs, retrieve saved artifacts, or examine files from a completed run. A saved image contains filesystem state. It does not retain a running process, process memory, open file handles, network connections, or a live terminal. Read Execution lifecycle before building a long-running or interactive workflow. Choose the save boundary for the workflow. A lazy SDK session saves on snapshot, idle timeout, or normal context exit; each snapshot stops its VM. A regular SDK session saves each completed non-disposable command. Every new operation starts fresh compute from its input image. See Execution lifecycle for the complete state model.The first workflow
1
Set up access and choose an image
Set up access, then find an available base image.
2
Choose a save boundary
Use the default lazy SDK session to reuse compute between commands and snapshot saved files. Use a regular SDK session for an independent operation per command.
3
Submit a command
Run a command. A lazy session starts or reuses its VM; a regular session starts a new operation from the selected image.
4
Check both results
Check the operation outcome and the process exit state.
5
Record saved state
Snapshot a lazy session, or use the saved image selected after a regular-session run. Record and inspect its immutable UUID before reusing it.
disposable=True before submission when a command should leave the saved image unchanged. The default lazy session does not support disposable commands; its filesystem changes remain live until saved or discarded on exceptional context exit.
Use Choose an interface for REST and MCP routes.
Build your workflow
The following recipes show how to compose individual steps within those broader jobs.Compare two fixes
Test two patches from the same starting image and continue from the passing version.
Prepare once and reuse
Save files and dependencies once, then use them in independent operations.
Stream test progress
Watch a build or test run, reconnect to its event stream, and check the final result.
Download an artifact
Generate a binary file in an operation, download it, and verify its contents.
What survives
Core identifiers
These identifiers are not interchangeable. Record immutable image UUIDs and operation IDs in reproducible workflows.