ConTree Documentation¶
Sandboxes That Branch Like Git
ConTree is a cloud-based sandbox API by Nebius that enables secure code execution with Git-like branching capabilities. Perfect for AI agents that need to explore multiple execution paths, evaluate outcomes, and backtrack when necessary.
Command-line client for sessions, branching, filesystem inspection, and scripting on top of the ConTree API.
ConTree MCPModel Context Protocol server for integrating ConTree sandboxes with AI assistants.
API PlaygroundInteractive OpenAPI playground with a short guide to ConTree API concepts.
ConTree SDKPython SDK for programmatic access to ConTree sandbox API.
Contents
Overview¶
ConTree combines VM-level isolation with container efficiency, providing a secure environment for executing untrusted code. Unlike traditional containers, ConTree supports Git-like branching — fork from any checkpoint, run parallel explorations, and roll back instantly.
Key Features¶
- Secure Isolation
VM-level isolation ensures untrusted code cannot escape the sandbox or affect other workloads.
- Git-like Branching
Fork execution state at any checkpoint. Explore multiple solution paths in parallel, then score results and expand the best branches.
- Instant Rollback
Return to any previous state with a single API call. No need to rebuild or re-execute from scratch.
- OCI Image Support
Import images from any OCI-compliant registry (Docker Hub, GHCR, etc.). Use your existing container images as sandbox bases.
- Resource Metrics
Built-in tracking of CPU time, memory usage, and I/O operations for every execution.
- Async Operations
All long-running operations (image imports, executions) are async with polling support and cancellation.
Quick Start¶
Choose a base state. Start from a preloaded environment, a previously produced checkpoint, or an imported OCI image.
Make inputs explicit. Attach the files and runtime assumptions the command needs so the run can be replayed later.
Start an execution. Run code inside the sandbox from the chosen state. Long-running work is represented as an operation.
Wait for the operation. Poll through the CLI, SDK, or generated client until execution reaches a terminal state.
Inspect the resulting checkpoint. Read logs, metrics, files, and artifacts from the state produced by the run.
Branch when needed. Fork from any useful checkpoint to try alternatives, compare outcomes, and continue from the best branch.
Use Cases¶
- AI Coding Agents
Let AI agents execute and test code safely. Branch to explore multiple approaches, evaluate results, and continue the most promising path.
- Research & Experimentation
Run experiments in isolated environments. Fork state to test variations without starting over.
- Educational Platforms
Provide students with safe code execution environments. Automatic cleanup and resource limits prevent abuse.
- CI/CD Pipelines
Execute build steps and tests in isolated sandboxes with full resource tracking and artifact retrieval.
Resources¶
API Playground — API concepts and interactive OpenAPI playground
ConTree CLI — Terminal client for interactive and scripted sandbox workflows
ConTree SDK — Python client for application integrations
Interactive API Sandbox — Explore the current API in your browser
OpenAPI Spec — Source of truth for current request and response schemas
contree.dev — Product homepage