SandboxOverview

Tangle Sandbox

Tangle Sandbox gives your application and your coding agents isolated Linux sandboxes. Create one in a call, run commands and coding agents in it, keep or fork its disk, and delete it when the work is done.

What you can do in a sandbox

TaskWhere to read
Run shell commands, long-running processes and Python, Node, TypeScript or Bash codeRun commands and code
Run a coding agent such as Claude Code, Codex or OpenCode on a taskRun a coding agent
Drive a coding agent’s own terminal UI inside the sandbox, from your terminal or a browserInteractive mode
Read, write, upload and download filesFiles
Clone repositories, commit and pushGit
Share a web server running in the sandbox through a public preview linkPorts and preview links
Snapshot a sandbox, restore it, or fork a running sandbox into copiesSnapshots and forks
Limit which hosts the sandbox can reachNetwork access
Give a coding agent a desktop it can see and control (computer use)MCP clients
Open a shell over SSH or a terminal in your own appShells and terminals
Run the same work across many sandboxesFleets
Attach a GPU for a fixed time and spend capGPU leases

The coding agents a deployment offers come from the API, not from this page. List them with client.listBackends() in TypeScript, or GET /v1/backends from Python, the CLI or any HTTP client:

const { backends } = await client.listBackends();
for (const backend of backends) console.log(backend.type, backend.name);

Each entry says whether the agent runs only on your own credential (callerCredentialOnly) and what it supports, such as streaming, MCP and sessions.

Four ways to use it

Way inInstallReference
TypeScript SDKnpm install @tangle-network/sandboxTypeScript SDK
Python SDKpip install tangle-sandbox (PyPI)Python SDK
CLI, the tangle commandnpm install -g @tangle-network/sandbox-cliCLI
REST API at https://sandbox.tangle.toolsAny HTTP clientREST API

All four call the same API with the same account key, so a sandbox created from one can be used from the others. The dashboard at sandbox.tangle.tools/dashboard shows the same sandboxes; see Dashboard.

Never run bare npx tangle: that npm name belongs to an unrelated package. Use npx @tangle-network/sandbox-cli.

The Python SDK covers creating, running and deleting sandboxes, files, git, prompts, snapshots, egress rules, fleets and batches. Interactive terminals, preview links, sessions and GPU leases are TypeScript, CLI or REST only; each guide names the path to use.

The parts of a sandbox

Each term has a full explanation in How sandboxes work.

  • Sandbox: an isolated Linux workspace with its own filesystem, network policy, size and lifetime.
  • Coding agent: the agent installed in a sandbox, such as Claude Code, Codex or OpenCode. Pick it with backend.type.
  • AgentProfile: the agent’s model, instructions, tools, MCP servers and permissions. See AgentProfiles.
  • Session: one conversation with a coding agent. Reuse its id to continue it. See Sessions.
  • Template and snapshot: a saved starting state and a saved copy of a sandbox’s files. See Snapshots and forks.
  • Scoped token: a short-lived token that lets a browser reach one sandbox without your account key. See API keys and tokens.
  • Fleet: several sandboxes under one budget and lifecycle. See Fleets.

Choose a starting point

You wantStart with
One command or an exact processbox.exec()
A coding agent on your own Claude, ChatGPT or coding planbackend.model.cliAuth; see Run a coding agent
One continuing agent conversationbox.prompt() with a sessionId, or box.session(id)
Several agents sharing one sandboxbox.agents
Separate machines or hard resource limitsA fleet
A lead agent that hands work to workers in their own sandboxesAgent graphs
A browser view of a sandbox or sessionA short-lived scoped token

box.agents exists only after you import @tangle-network/sandbox/agent, which adds it to every sandbox handle:

import { Sandbox } from "@tangle-network/sandbox/agent";

Next steps

Changes to the SDKs, CLI and API are listed in the Sandbox release notes.