Image into a named sandbox template and launch new sandboxes from it on demand.
And when a sandbox goes idle, Tensorlake can suspend it and bring it back on the next request or scheduled wake-up, so you can preserve state without keeping it running.
Setup
Quickstart
Create a tiny sandbox for a quick task, or provision one with more CPU and memory for heavier workloads.- CLI
- Python
Features
Command Execution
Run shell commands with full stdout/stderr capture or stream output in real time using SSE.
File Management
Read, write, and delete files. List directories with metadata. Transfer data in and out of sandboxes.
Process Management
Start background processes, send signals, monitor status, and stream stdout/stderr independently.
Network Controls
Allow or deny internet access. Block specific outbound destinations when needed.
Snapshots
Capture sandbox filesystem and memory state, then restore or branch from it later.
Templates
Prebuild dependencies and setup steps once, then start new sandboxes from a named template.
Use Cases
AI Code Execution
Run LLM-generated code in isolated containers with network restrictions and resource limits. Integrate sandboxes as tools in agentic workflows.
Agentic Swarm Intelligence
Orchestrate a swarm of LLM agents running specialized tasks in parallel sandboxes.
Agentic Dungeons & Dragons
Build a dynamic D&D-style game where parallel AI agents act as scene writers and a Dungeon Master agent orchestrates the story.
RL Training with GSPO
Fine-tune a language model on code generation tasks using Group Sequence Policy Optimization, with sandboxes as the reward oracle.
Reproducible RL Environments
Guarantee isolated, deterministic rollouts for RL training. Run parallel episodes with full seed control and no shared state between workers.
Agentic Autoresearch Loop
Autonomously improve an ML training script overnight using an LLM agent that proposes code modifications and races them in parallel sandboxes.
When to Use Sandboxes vs @function()
| Use Case | Approach |
|---|---|
| Agent tool calls with different dependencies | Use @function() — built-in isolation per function |
| Executing LLM-generated code | Use Sandboxes — dynamic creation with network restrictions |
| Batch processing with bounded resources | Use @function() with max_containers |
| Interactive code execution (notebooks, REPLs) | Use Sandboxes — create on demand, inspect, and tear down |
| Untrusted user-submitted code | Use Sandboxes — network restrictions and resource limits |
@function() in Tensorlake Applications, you don’t need standalone sandboxes. Sandboxes are for cases where you need dynamic, on-demand container creation with fine-grained control.
Learn More
Lifecycle
Sandbox states, resources, timeouts, and lifecycle operations.
Commands
Run commands, inspect output, and open interactive shells.
Networking
Control internet access and blocked destinations.
Templates
Create reusable named starting points for sandboxes from application images.