Build agents with sandboxes and serverless orchestration runtime
Tensorlake is a compute infrastructure platform for building agentic applications with sandboxes.
The Sandbox API creates MicroVM sandboxes which you can use to run agents, or use them as an isolated environment for running tools or LLM generated code.
In addition to stateful VMs, you can also add long running orchestration capabilities to Agents using a serverless function runtime with fan-out capabilities.
Sandboxes
Tensorlake Sandboxes are stateful Firecracker MicroVMs built for instant, stateful execution environments for AI agents — spin up millions of VMs with near-SSD filesystem performance.
Key capabilities
- Fastest Filesystem I/O — Block-based storage achieving near-SSD speeds inside virtual machines. In SQLite benchmarks (2 vCPUs, 4 GB RAM), Tensorlake completes in 2.45s vs Vercel 3.00s (1.2×), E2B 3.92s (1.6×), Modal 4.66s (1.9×), and Daytona 5.51s (2.2×).
- Fast startup — Sandboxes created in under a second via Lattice, a dynamic cluster scheduler.
- Snapshots & cloning — Snapshot at any point to create durable memory and filesystem checkpoints; clone running sandboxes instantaneously across machines.
- Auto suspend/resume — Sandboxes suspend when idle and resume in under a second without losing any memory or filesystem state.
- Live migration — Sandboxes automatically move between machines during updates with only a brief pause of a few seconds.
- Scale — Supports up to 5 million sandboxes in a single project.
Python SDK Installation
pip install tensorlake
CLI Installation
The tl CLI is distributed as a standalone binary, not through PyPI or npm.
Install it with the install script:
curl -fsSL https://tensorlake.ai/install | sh
Setup
Sign up at cloud.tensorlake.ai and get your API key.
export TENSORLAKE_API_KEY="your-api-key"
tl login
Create Your First Sandbox (CLI)
Create a sandbox, run a command, and clean up:
# Create a sandbox (waits for it to run; a timeout leaves it queued, never cancels it)
tl sbx create
# Request a sandbox without waiting, then collect it later
tl sbx create --no-wait
tl sbx wait <sandbox-id> --timeout 1800
# Run a command inside it
tl sbx exec <sandbox-id> -- sh -lc "printf 'Hello from the sandbox!\n'"
# Copy a file into the sandbox
tl sbx cp ./my_script.py <sandbox-id>:/tmp/my_script.py
# Open an interactive terminal
tl sbx ssh <sandbox-id>
# Block all outbound internet access on a running sandbox
tl sbx update <sandbox-id> --no-internet
# Allow outbound traffic only to selected destinations
tl sbx update <sandbox-id> --network-allow api.example.com
# Remove the network policy and restore unrestricted outbound access
tl sbx update <sandbox-id> --clear-network
# Terminate when done
tl sbx terminate <sandbox-id>
Omit --image to use Tensorlake's default managed environment. To select a
custom environment, pass the name of a registered Sandbox Image; arbitrary
Docker image references are not supported.
Create a Sandbox Programmatically
from ten