Skip to main content

Setup

1

Install the Tensorlake package

pip install tensorlake
This installs the Python SDK. It also ships the tl and tensorlake CLIs in your Python toolchain’s bin directory.
2

Authenticate

tl login
After you run tl login, you can manage your sandboxes in the Tensorlake Dashboard. You can also create API keys there for sandbox connections. See Authentication for the full API key setup flow.

Run your first sandbox

Create a tiny sandbox for a quick task, or provision one with more CPU and memory for heavier workloads.
# Create an ephemeral sandbox (no name — terminates when done, cannot be suspended)
tl sbx new --cpus 2.0 --memory 2048 --timeout 600

# Create a named sandbox (can be suspended and resumed between tasks)
tl sbx new my-agent-env --cpus 2.0 --memory 2048

# List sandboxes and copy the sandbox ID
tl sbx ls

# Run code inside the sandbox
tl sbx exec <sandbox-id> python -c 'print("Hello from sandbox")'

# Copy files in or out as the sandbox accumulates state
tl sbx cp local-file.txt <sandbox-id>:/workspace/local-file.txt

# Save a checkpoint you can return to later
tl sbx snapshot <sandbox-id>

# Branch from the current live state without starting over
tl sbx clone <sandbox-id>

# Suspend a named sandbox when you are done for now, or terminate it when the work is finished
tl sbx suspend <sandbox-id>
tl sbx terminate <sandbox-id>

Next

  • Lifecycle — ephemeral vs. named, suspend/resume, snapshots, and state transitions.
  • Commands — run shell commands and stream output.
  • Sandbox Images — prebuild dependencies once and launch new sandboxes from a named image.