Compare

Tangle vs E2B: run the coding agent without bringing a model key

One prompt call gives the agent in your sandbox its task and returns the result, token usage and cost, all billed to one Tangle balance.

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

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

const box = await client.create({
  git: { url: "https://github.com/tangle-network/sandbox-demo" },
  backend: { type: "claude-code" },
});
try {
  // No model key: the model bills to your Tangle balance.
  const run = await box.prompt("`npm test` fails. Find the cause and fix it.");
  console.log(run.success, run.response);
  console.log(run.usage, run.costUsd);
} finally {
  await box.delete();
}

The result, token usage and cost come back from one call (docs.tangle.tools/sandbox/cloud-agents). Claude Code's first reply arrives 3.4s after create at p50 and 12s at p95, over 45 measured runs (tangle.tools/benchmarks).

What else you get

Move your code from E2B

-import { Sandbox } from "e2b";
+import { Sandbox } from "@tangle-network/sandbox";
 
-const box = await Sandbox.create();
+const client = new Sandbox({
+  apiKey: process.env.TANGLE_API_KEY!,
+  baseUrl: "https://sandbox.tangle.tools",
+});
+const box = await client.create();
 try {
-  const run = await box.commands.run("python3 -c 'print(42)'");
+  const run = await box.exec("python3 -c 'print(42)'");
   console.log(run.stdout);
 } finally {
-  await box.kill();
+  await box.delete();
 }

Code that calls E2B's REST API can point its sandbox, file and process requests at sandbox.tangle.tools/e2b and send your Tangle key. (docs.tangle.tools/sandbox/migrate-e2b#call-the-e2b-compatible-rest-routes)

For everything else, the move guide maps E2B's sandbox, command, file and timeout calls.

What every sandbox includes

Model calls
Tangle Router by default, billed to the same Tangle balance as the sandbox (docs.tangle.tools/sandbox/cloud-agents)
Isolation
A container or a Firecracker microVM, chosen per sandbox (docs.tangle.tools/sandbox/security)
Secrets
Stored once; you choose whether the sandbox can read a secret or only the network proxy can (docs.tangle.tools/sandbox/secrets)
Network
Open, a strict allowlist, or blocked, changeable while the sandbox runs (docs.tangle.tools/sandbox/egress)
Run records
Every agent turn is traced, and an Intelligence report summarizes what the agent did (docs.tangle.tools/sandbox/observability)