Tangle vs Daytona: one call runs the coding agent and returns its result and cost
There is no model key to set: Tangle Router pays for the agent's model from the same balance as the sandbox.
Create a sandboximport { 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
- Pi, Hermes, Kimi Code and Prime Agent are installed beside Claude Code, Codex, OpenCode and OpenClaw in every sandbox. (tangle.tools)
- Set a dollar budget for a fleet of agents, and the platform refuses any charge past it. (docs.tangle.tools/sandbox/agents-fleet)
- Sandbox compute and the agent's model calls bill to one Tangle balance. (docs.tangle.tools/sandbox/cloud-agents)
Move your code from Daytona
-import { Daytona } from "@daytona/sdk";
+import { Sandbox } from "@tangle-network/sandbox";
-const daytona = new Daytona();
-const box = await daytona.v0.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.process.executeCommand("python3 -c 'print(42)'");
- console.log(run.exitCode, run.result);
+ const run = await box.exec("python3 -c 'print(42)'");
+ console.log(run.exitCode, run.stdout);
} finally {
await box.delete();
}For everything else, the move guide maps Daytona's sandbox, process and file calls and its auto-stop settings.
What every sandbox includes
- Coding agents
- Claude Code, Codex, OpenCode, Pi, Hermes, OpenClaw, Kimi Code and Prime Agent installed in every sandbox (tangle.tools)
- 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)