Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.tensorlake.ai/llms.txt

Use this file to discover all available pages before exploring further.

Setup

1

Install the Tensorlake CLI

curl -fsSL https://tensorlake.ai/install | sh
This installs the tl and tensorlake CLIs, which you can use to manage sandboxes and other resources from the command line.
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 create

# 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

Configure CPU, Memory, Disk, and Timeout

You can specify CPU, memory, disk, and timeout parameters when creating sandboxes. The defaults are 1 CPU, 1024 MB memory, 10 GB disk, and 300 seconds timeout.
tl sbx create --cpus 2.0 --memory 2048 --disk_mb 51200 --timeout 600

Suspend and Resume

Tensorlake sandboxes can be suspended and resumed. A resumed sandbox continues from the exact memory and file system state, it was suspended. This is useful when you want to preserve the sandbox state without paying for idle compute time. You have to name a sandbox to make them suspendable after timeout. Sandboxes without a name are ephemeral and thrown away after the timeout.
  tl sbx suspend <sandbox-name>
  tl sbx resume <sandbox-name>

Sandbox Checkpoints

Checkpoints are point in time snapshot of a sandbox that you can use to start new sandboxes from.
  tl sbx checkpoint <sandbox-id>

Terminate Sandboxes

  tl sbx terminate <sandbox-id>

SSH Access

You can also SSH into your sandboxes for an interactive terminal experience.
tl sbx ssh <sandbox-id>
This uses a websocket based PTY session to connect you to the sandbox. For programmatic access, you can create and control PTY session with the Python and TypeScript SDKs.

Next Steps

Lifecycle

Understand the different states and behaviors of sandboxes.

Commands

Run shell commands and stream output.

Sandbox Images

Use and customize sandbox images for your use case.