> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokenfactory.nebius.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

<Note>
  Sandboxes are currently in Beta. We value your feedback, please send us email to [contree@nebius.com](mailto:contree@nebius.com) or reach out in [Discord](https://discord.com/channels/1222156136380235877/1476967257585221845).
</Note>

Sandboxes is a cloud-based sandbox API by Nebius that enables secure code execution with Git-like branching capabilities. It is built for AI agents that need to explore multiple execution paths, evaluate outcomes, and backtrack when necessary.

Sandboxes combines VM-level isolation with container efficiency, providing a secure environment for executing untrusted code. Unlike traditional containers, Sandboxes supports Git-like branching — fork from any checkpoint, run parallel explorations, and roll back instantly.

## Key features

<Columns cols={2}>
  <Card title="Secure isolation" icon="shield-check">
    VM-level isolation ensures untrusted code cannot escape the sandbox or affect other workloads.
  </Card>

  <Card title="Git-like branching" icon="code-branch">
    Fork execution state at any checkpoint. Explore multiple solution paths in parallel, then score results and expand the best branches.
  </Card>

  <Card title="Instant rollback" icon="rotate-left">
    Return to any previous state with a single API call. No need to rebuild or re-execute from scratch.
  </Card>

  <Card title="OCI image support" icon="cube">
    Import images from any OCI-compliant registry (Docker Hub, GHCR, and others). Use your existing container images as sandbox bases.
  </Card>

  <Card title="Resource metrics" icon="chart-line">
    Built-in tracking of CPU time, memory usage, and I/O operations for every execution.
  </Card>

  <Card title="Async operations" icon="clock">
    All long-running operations (image imports, executions) are async with polling support and cancellation.
  </Card>
</Columns>

## Quick start

<Steps>
  <Step title="Choose a base state">
    Start from a preloaded environment, a previously produced checkpoint, or an imported OCI image.
  </Step>

  <Step title="Make inputs explicit">
    Attach the files and runtime assumptions the command needs so the run can be replayed later.
  </Step>

  <Step title="Start an execution">
    Run code inside the sandbox from the chosen state. Long-running work is represented as an operation.
  </Step>

  <Step title="Wait for the operation">
    Poll through the CLI, SDK, or generated client until execution reaches a terminal state.
  </Step>

  <Step title="Inspect the resulting checkpoint">
    Read logs, metrics, files, and artifacts from the state produced by the run.
  </Step>

  <Step title="Branch when needed">
    Fork from any useful checkpoint to try alternatives, compare outcomes, and continue from the best branch.
  </Step>
</Steps>

## Use cases

<Columns cols={2}>
  <Card title="AI coding agents" icon="robot">
    Let AI agents execute and test code safely. Branch to explore multiple approaches, evaluate results, and continue the most promising path.
  </Card>

  <Card title="Research and experimentation" icon="flask">
    Run experiments in isolated environments. Fork state to test variations without starting over.
  </Card>

  <Card title="Educational platforms" icon="graduation-cap">
    Provide students with safe code execution environments. Automatic cleanup and resource limits help prevent abuse.
  </Card>

  <Card title="CI/CD pipelines" icon="gears">
    Execute build steps and tests in isolated sandboxes with full resource tracking and artifact retrieval.
  </Card>
</Columns>

<Warning>
  **Beta limitations**

  * Number of simultaneously running operations is limited to 50.
  * Checkpoint images retention is set to 180 days. After this period we may delete untagged unreferenced images (those that do not produce any other images).

  Please contact us if you need those limitations lifted for the beta period.
</Warning>

## Resources

* [Sandboxes for SWE agents](/sandboxes/swe-agents) — Preloaded environments and Hugging Face datasets
* [Contree SDK](/sandboxes/sdk) — Python SDK for programmatic access to the Sandboxes API
* [Contree CLI](/sandboxes/cli) — Terminal client for interactive and scripted sandbox workflows
* [Contree MCP](/sandboxes/mcp) — Model Context Protocol server for AI assistants
