Machines for agents, model routing and run records.

Tangle runs your agents on their own Linux machines, routes their model calls and records every step.

Create a sandbox
$ npm install @tangle-network/sandbox
Your codefix-a-test.mts
“npm test fails. Find the cause and fix it.”
backend claude-codegit tangle-network/sandbox-demo
create4.5 s
Tangle
Sandboxsandbox-43e897047256
Bashnpm test
not ok 4 - [null-guard] a user without a name is anonymous
Editpackages/cli/src/flags.js
Editpackages/shared/src/format.js
Editpackages/shared/src/dates.js
Bashnpm test # pass 9 # fail 0
Tangle Router$0.0145
192,627 tokens in + 175,408 from cache · 2,460 out
exec3.2 s
Back to you12 Nov 2026
9 tests passed
flags.js+7−1
dates.js+3−3
format.js+1−1
0:40from create
to delete

16 coding agents, installed.

Pick one to replay a real session recorded in a Tangle sandbox, then run it on your own account.

The same machine from your terminal.

Output recorded from the tangle CLI against production. Sign in once and the commands run on your account.

Recorded output

Loading the recording

0:00 / 0:00

Recorded runs you can start from.

Each agent gets its own Linux machine.

Coding agents run commands and edit files. On Tangle they do it on a Linux machine made for that run, and you get the changes back with a record of each step.

SDK reference ↗
sandboxes/browser-task.mtssandbox-d81421f51450recorded 2026-11-12 22:08 UTC0:46
import { Sandbox } from "@tangle-network/sandbox";

const client = new Sandbox({
  apiKey: process.env.TANGLE_API_KEY!,
  baseUrl: "https://sandbox.tangle.tools",
});

// The agent drives the sandbox's own Chromium with Playwright.
const box = await client.create({
  backend: { type: "claude-code" },
  resources: { cpuCores: 2, memoryMB: 4096 },
  // The default allowlist, plus Playwright's CDN and the one site it reads.
  egressPolicy: {
    mode: "strict",
    includeImplicitDomains: true,
    allowDomains: ["cdn.playwright.dev", "playwright.download.prss.microsoft.com", "news.ycombinator.com"],
  },
});
try {
  const run = await box.prompt(
    "Install Playwright with Chromium. Open https://news.ycombinator.com, " +
      "save a full page screenshot to /home/agent/front.png, and write the five " +
      "top story titles to /home/agent/top.json as a JSON array of strings.",
  );
  if (!run.success) throw new Error(run.error);

  console.log(JSON.parse(await box.read("/home/agent/top.json")));
  await box.fs.download("/home/agent/front.png", "front.png");
} finally {
  await box.delete();
}
→ sandbox-d81421f514505.5 s→ success37.9 s→ 208 bytes617 ms→ front.png, 219,319 bytes859 ms→ destroyed1.3 s
Install Playwright with Chromium. Open https://news.ycombinator.com, save a full page screenshot to /home/agent/front.png, and write the five top story titles to /home/agent/top.json as a JSON array of strings.
Bashplaywright install chromium2.1 s
403 EGRESS_DOMAIN_NOT_ALLOWED storage.googleapis.com
There's a system Chromium available. Let me use it with Playwright's executable_path.
Writepw/capture.py18 ms
Bashpython capture.py3.7 s
Bashls -la front.png top.json100 ms
-rw-r--r-- 1 agent agent 219319 Nov 12 22:09 /home/agent/front.png
Done. Both artifacts are in place.
front.png1280×1186 · 219,319 bytes
top.jsonJSON array · 208 bytes
front.png and top.json written· exit 0· 0:46· $0.02 in model calls

Claude Code runs on your Claude plan.

Store the token from claude setup-token once. The create request carries only the secret's name, and the agent's model calls bill to your plan.

Claude Code subscription ↗
~/your-repo
# Claude Pro or Max: `claude setup-token` prints the token
$ tangle secret create CLAUDE_TOKEN --value-stdin <<< "$CLAUDE_CODE_OAUTH_TOKEN"
$ tangle sandbox create --name my-claude --backend claude-code \
    --cli-auth CLAUDE_TOKEN \
    --git-url https://github.com/your-org/your-repo --idle-timeout 900
$ tangle agent prompt my-claude "Find the failing test and fix it." \
    --session fix-tests --stream
CredentialModel usage is billed to
Claude subscriptionYour Claude plan
ChatGPT plan or OpenAI keyYour ChatGPT plan or OpenAI account
Coding planThat provider
Tangle Router (default)Your Tangle credit
Tangle bills sandbox compute per second in every case.

Tangle cancels the fleet at its script cap.

fleet.spend() reads the total, and fleet.cancel() stops every agent still running.

Fleets ↗
fleets/cancel-on-cap.mtsfleet_db3cca8418444c7cb7b75a49recorded 2026-11-18 00:07 UTC1:26
import { Sandbox } from "@tangle-network/sandbox";

const client = new Sandbox({
  apiKey: process.env.TANGLE_API_KEY!,
  baseUrl: "https://sandbox.tangle.tools",
});

// Claude Code harness, DeepSeek V4.1 Flash. The Platform refuses any charge past $2; this script stops everyone at $0.20.
const ideas = ["a lookup table", "a streaming parser", "fewer allocations",
  "worker threads", "WebAssembly", "a hand written tokenizer"];
const fleet = await client.fleets.create({
  agents: ideas.map((idea) => ({
    task: `Make bench/parse.js faster with ${idea}. Report the speedup.`,
  })),
  placement: "dedicated",
  defaults: {
    git: { url: "https://github.com/tangle-network/sandbox-demo" },
    backend: { type: "claude-code", model: { model: "deepseek/deepseek-v4.1-flash" } },
  },
  budgetUsd: 2,
});

const softCapUsd = 0.2;
async function checkSpend() {
  const { spentUsd } = await fleet.spend();
  if (spentUsd < softCapUsd) return;
  clearInterval(watch);
  const { interrupted } = await fleet.cancel();
  console.log(`$${spentUsd.toFixed(2)} spent, ${interrupted} agents stopped`);
}
const watch = setInterval(() => void checkSpend().catch(console.error), 5_000);

try {
  const results = await fleet.runAll();
  // status: completed, failed, cancelled or budget_exhausted
  for (const r of results) console.log(r.agentId, r.status, r.costUsd);
} finally {
  clearInterval(watch);
  await fleet.delete();
}
→ fleet_db3cca8418444c7c…4.7 s→ spentUsd 0.2129 ×15208 ms to 606 ms→ { interrupted: 6 }1.8 s→ 6 results1:16→ deleted4.9 s
Fleet spend, USD$0.00$0.20$0.40softCapUsd = 0.2: $0.20 USDsoftCapUsd = 0.20:100:200:300:400:501:051:20fleet.cancel() at 1:20, $0.21: 1:20fleet.cancel() at 1:20, $0.21Fleet spend, USD · : 0:10 · Fleet spend, USD: $0.03 USD · observation count unknownFleet spend, USD · : 0:15 · Fleet spend, USD: $0.04 USD · observation count unknownFleet spend, USD · : 0:20 · Fleet spend, USD: $0.05 USD · observation count unknownFleet spend, USD · : 0:25 · Fleet spend, USD: $0.06 USD · observation count unknownFleet spend, USD · : 0:30 · Fleet spend, USD: $0.06 USD · observation count unknownFleet spend, USD · : 0:35 · Fleet spend, USD: $0.07 USD · observation count unknownFleet spend, USD · : 0:40 · Fleet spend, USD: $0.09 USD · observation count unknownFleet spend, USD · : 0:45 · Fleet spend, USD: $0.11 USD · observation count unknownFleet spend, USD · : 0:50 · Fleet spend, USD: $0.11 USD · observation count unknownFleet spend, USD · : 0:55 · Fleet spend, USD: $0.13 USD · observation count unknownFleet spend, USD · : 1:00 · Fleet spend, USD: $0.14 USD · observation count unknownFleet spend, USD · : 1:05 · Fleet spend, USD: $0.17 USD · observation count unknownFleet spend, USD · : 1:10 · Fleet spend, USD: $0.18 USD · observation count unknownFleet spend, USD · : 1:16 · Fleet spend, USD: $0.20 USD · observation count unknownFleet spend, USD · : 1:20 · Fleet spend, USD: $0.21 USD · observation count unknown
Fleet spend, USD$0.00$0.20$0.40softCapUsd = 0.2: $0.20 USDsoftCapUsd = 0.20:100:350:501:051:20fleet.cancel() at 1:20, $0.21: 1:20fleet.cancel() at 1…Fleet spend, USD · : 0:10 · Fleet spend, USD: $0.03 USD · observation count unknownFleet spend, USD · : 0:15 · Fleet spend, USD: $0.04 USD · observation count unknownFleet spend, USD · : 0:20 · Fleet spend, USD: $0.05 USD · observation count unknownFleet spend, USD · : 0:25 · Fleet spend, USD: $0.06 USD · observation count unknownFleet spend, USD · : 0:30 · Fleet spend, USD: $0.06 USD · observation count unknownFleet spend, USD · : 0:35 · Fleet spend, USD: $0.07 USD · observation count unknownFleet spend, USD · : 0:40 · Fleet spend, USD: $0.09 USD · observation count unknownFleet spend, USD · : 0:45 · Fleet spend, USD: $0.11 USD · observation count unknownFleet spend, USD · : 0:50 · Fleet spend, USD: $0.11 USD · observation count unknownFleet spend, USD · : 0:55 · Fleet spend, USD: $0.13 USD · observation count unknownFleet spend, USD · : 1:00 · Fleet spend, USD: $0.14 USD · observation count unknownFleet spend, USD · : 1:05 · Fleet spend, USD: $0.17 USD · observation count unknownFleet spend, USD · : 1:10 · Fleet spend, USD: $0.18 USD · observation count unknownFleet spend, USD · : 1:16 · Fleet spend, USD: $0.20 USD · observation count unknownFleet spend, USD · : 1:20 · Fleet spend, USD: $0.21 USD · observation count unknown
Fleet spend, USD by
SetupFleet spend, USDObservationsRecorded intervalRecorded annotation
Fleet spend, USD0:10$0.03 USDobservation count unknownnot recorded
Fleet spend, USD0:15$0.04 USDobservation count unknownnot recorded
Fleet spend, USD0:20$0.05 USDobservation count unknownnot recorded
Fleet spend, USD0:25$0.06 USDobservation count unknownnot recorded
Fleet spend, USD0:30$0.06 USDobservation count unknownnot recorded
Fleet spend, USD0:35$0.07 USDobservation count unknownnot recorded
Fleet spend, USD0:40$0.09 USDobservation count unknownnot recorded
Fleet spend, USD0:45$0.11 USDobservation count unknownnot recorded
Fleet spend, USD0:50$0.11 USDobservation count unknownnot recorded
Fleet spend, USD0:55$0.13 USDobservation count unknownnot recorded
Fleet spend, USD1:00$0.14 USDobservation count unknownnot recorded
Fleet spend, USD1:05$0.17 USDobservation count unknownnot recorded
Fleet spend, USD1:10$0.18 USDobservation count unknownnot recorded
Fleet spend, USD1:16$0.20 USDobservation count unknownnot recorded
Fleet spend, USD1:20$0.21 USDobservation count unknownnot recorded
Recorded targets
TargetKindFromTo
softCapUsd = 0.2stretch$0.20 USD$0.20 USD
Recorded events by
EventKind from to
fleet.cancel() at 1:20, $0.21event1:20
fleet.cancel() at 1:20· $0.21 spent of a $2 budget

One key. One bill.

Compute, inference and observability draw on one balance.

2 vCPU · 4096 MB · 2 GB$0.0506 / hour
Minimum for any sandbox$0.0400 / hour
/v1/pricing/sandboxes ↗

Free

$0

No included credit

  • 1 concurrent sandbox
  • 3 snapshots per sandbox
  • 100 GiB egress per account each month, refused beyond it, never charged

Team

$99/ month

$99 credit each month

  • Unlimited sandboxes
  • 25 snapshots per sandbox
  • 2 TB egress per sandbox each month, then $0.04/GB

Run Claude Code on your public repo.

Get an API key
sandboxes/fix-a-test.mtsline 10
-  git: { url: "https://github.com/tangle-network/sandbox-demo" },+  git: { url: "https://github.com/your-org/your-repo" },
$ npm install @tangle-network/sandbox
$ export TANGLE_API_KEY=sk-tan-…
$ npx tsx fix-a-test.mts