The LangSmith CLI includes experimental sandbox commands for creating snapshots, booting sandboxes, running commands, opening interactive shells, and tunneling TCP connections into a sandbox. Sandbox CLI commands require LangSmith CLIDocumentation Index
Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-mdrxyo-1777658790-7be347c.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
v0.2.26 or later.
Install and authenticate
Install or upgrade the LangSmith CLI:--format pretty to list commands for human-readable tables:
End-to-end workflow
Every sandbox boots from a snapshot. Build a snapshot from a Docker image, create a sandbox from that snapshot, then run commands inside it:Manage snapshots
Build snapshots from Docker images:Manage sandboxes
Create a sandbox from a snapshot:Proxy configuration
Use--proxy-config @proxy.json on create or update to configure the sandbox auth proxy. Prefer workspace secrets for credential injection instead of placing raw secrets in local files.
Run commands
Usesandbox exec for one-off commands:
-- is sent to the sandbox as the command. The CLI prints stdout to stdout, stderr to stderr, and exits with the sandbox command’s exit code.
Open an interactive console
Usesandbox console for a PTY-backed interactive shell:
--forward-ssh-agent requires SSH_AUTH_SOCK to be set locally. Interactive console sessions are not supported on Windows; use SSH access instead.
Tunnel TCP ports
Usesandbox tunnel when you need a local TCP port that forwards to a service listening inside the sandbox. This is useful for databases, language servers, custom protocols, or local tools that expect localhost.
Start a service in the sandbox, then tunnel to it:
--local-port, the CLI uses the same value as --remote-port:
Ctrl+C.
You can also tunnel by sandbox URL instead of name:
Set up SSH access
Usesandbox ssh-setup to configure standard SSH tools such as ssh, scp, rsync, and sftp through a sandbox tunnel.
Host sandbox-<name> block to ~/.ssh/config, and writes sandbox host keys to ~/.ssh/known_hosts_sandboxes.
After setup, connect with:
sshd on port 22. If sshd is not running, ssh-setup warns and the SSH connection will not work until you start it inside the sandbox.
Command reference
| Command | Description |
|---|---|
langsmith sandbox snapshot list | List snapshots. |
langsmith sandbox snapshot build <name> --docker-image <image> | Build a snapshot from a Docker image. |
langsmith sandbox snapshot capture <name> --box <sandbox> | Capture a snapshot from a running sandbox. |
langsmith sandbox snapshot get <snapshot-id> | Inspect a snapshot. |
langsmith sandbox snapshot wait <snapshot-id> | Wait for a snapshot to become ready. |
langsmith sandbox snapshot delete <snapshot-id> | Delete a snapshot. |
langsmith sandbox create <name> --snapshot-id <snapshot-id> | Create a sandbox from a snapshot. |
langsmith sandbox list | List sandboxes. |
langsmith sandbox get <name> | Inspect a sandbox. |
langsmith sandbox update <name> | Update sandbox resources or proxy config. |
langsmith sandbox wait <name> | Wait for a sandbox to become ready. |
langsmith sandbox start <name> | Start a stopped sandbox. |
langsmith sandbox stop <name> | Stop a running sandbox while preserving filesystem state. |
langsmith sandbox delete <name> | Delete a sandbox. |
langsmith sandbox exec <name> -- <command> | Run a one-off command inside a sandbox. |
langsmith sandbox console <name> | Open an interactive shell inside a sandbox. |
langsmith sandbox tunnel <name> --remote-port <port> | Forward a local TCP port to a sandbox port. |
langsmith sandbox ssh-setup <name> | Configure local SSH access through sandbox tunnel --stdio. |
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

