Head to head · Code sandboxes · October 2026 research run
Cloudflare Sandbox SDK vs Together Code Sandbox
Cloudflare Sandbox SDK scores 71.6 (BB) on agent readiness against Together Code Sandbox's 56 (C), and leads in 5 of 7 scored categories. Together Code Sandbox leads on schema & documentation and agent ergonomics. Both do code sandboxes.
Best code execution sandboxes for AI agents · All 325 sandboxes comparisons
Which one, for what
Best for Agents already built on Workers and Durable Objects that want sandboxes in the same account with credential injection at the edge.
Ahead on
- Reliability, 90 against 32
- Security & auth, 73 against 46
- Payments & pricing, 45 against 30
- Maintenance & community, 90 against 83
- Transparency & trust, 86 against 59
Also in its favour
- Agent-ready, a grade of BB or better
- No key needed to call it
- Open source
Watch for
No hosted API. You deploy and secure a Worker before an agent can call anything, and the starter has no auth
Best for Teams already buying from Together, and former CodeSandbox SDK users, who want Docker-defined sandboxes with disk and memory snapshots from Python or TypeScript.
Ahead on
- Schema & documentation, 86 against 77
- Agent ergonomics, 70 against 63
Also in its favour
- A hosted endpoint, with nothing to install
- No incidents deducted, where Cloudflare Sandbox SDK loses 3 points for them
Watch for
The SDK and CLI work only for organisations Together has enabled, and the docs say to contact Together for access
Why the edge
Each category where one leads by five points or more, with the reason behind each side's score from its assessment. The numbers are in the table below; this is what they stand for.
Reliability Cloudflare Sandbox SDK +58
Cloudflare Sandbox SDK 90
Scored on the SDK checklist, since the listing is a library. Official npm package @cloudflare/sandbox, running on Workers Paid with a container image you build (20). Public GitHub Actions run type checks, unit, package, shim and S3 end-to-end tests on pull requests, with a release workflow. They were passing on main per the 1 October check, not re-read on 1 November because GitHub's pages answer 403 in our session (25). Open issues weren't readable on 1 November. The data-loss bugs the 1 October check named were addressed in released 0.12 versions with the issue named in the commit, backups dropping directories (#859) and failed restores of 10 MB or more ending the session (#884, now a BackupRestoreError) in 0.12.11, and tunnels.get() (#874) in 0.12.12, among 12 issues closed by name on the 0.x branch since August. allowedHosts failing closed (#844) wasn't found among them (15 of 25). Release notes flag breaking changes, and 1.0.0 shipped as a major with a migration guide and an API map from 0.12 (15). 1.0.3 is current, and 0.x gets fixes until 31 December 2026 (15). Cloudflare's own status page isn't scored on these lines. 20 + 25 + 15 + 15 + 15 = 90.
Together Code Sandbox 32
Read with the hosted lines. status.together.ai lists the website, the playground and inference models with no component for the sandbox service, and a vendor status page with no component for the product takes 15. Incident line kept at 5. The Together page posts no incident since 6 January 2025, while status.codesandbox.io, which lists the CodeSandbox API and two clusters, wasn't re-read on 4 November (codesandbox.io answers a bot check, so its terms are unread), per the 8 October check (5). No rate or concurrency limits found, and the migration guide says the concurrency count and limit are not exposed (0). Both SDKs retry 408, 429, 500, 502, 503 and 504 three times with exponential backoff from 0.5 seconds plus jitter, and the SDK references say snapshots.create is not idempotent and should be excluded from retries. That is safe-retry guidance with no idempotency keys (12). No SLA found, and the terms make no uptime guarantee outside an order form (0). The docs still say the SDK must be enabled for an organisation, on request to sales, which is not general availability (0). 15 + 5 + 0 + 12 + 0 + 0 = 32.
Security & auth Cloudflare Sandbox SDK +27
Cloudflare Sandbox SDK 73
There's no hosted credential to score. Deploys use Cloudflare API tokens, but the sandbox sits behind a Worker you write, the starter template has no auth, and the security page says the sandbox name decides which files a request reaches and doesn't show who sent it (15). Each sandbox is a separate VM with its own filesystem, process space and network stack (10). Outbound traffic can be cut off with enableInternet = false or limited with a deny-by-default allowedHosts list and deniedHosts, all GA, though internet access is on by default (10). Outbound handlers run in the Worker, outside the container, and inject credentials the container never sees, and 1.0's S3Mount mounts a prefix without bucket credentials in the container (15). Sandbox labels for analytics, and since 0.12.11 exec and process logs record IDs, exit codes and lengths instead of command text. Account audit logs weren't read (5). security.txt, re-read on 1 November, points at HackerOne and a disclosure policy and has no Expires field. Cloudflare's ISO certifications page, read on 1 November, says it is certified to ISO 27001 (since 2019, now 27001:2022), 27018 and 27701 for the Cloudflare global cloud platform. 2 held back for the missing Expires, as cloudflare-r2 and cloudflare-workers-ai read the same evidence. OSV lists no advisory for @cloudflare/sandbox (18). 15 + 20 + 15 + 5 + 18 = 73.
Together Code Sandbox 46
Project-scoped API keys, revocable within about five minutes, with optional expiry and rotation guidance, read as the Together inference and fine-tuning listings read the same key model (30). The in-VM OpenAPI document still lists ?token= as a documented way to authenticate the WebSocket exec path, so the checklist's fixed 10 comes off (20). Each sandbox is a virtual machine. Every port is open to everyone unless the experimental inbound policy is set, no outbound rules exist, and project roles are admin and editor with no read-only role (8). The sandbox returns the output of code the agent ran, with no guidance on untrusted output found (8). Sandboxes can be listed with tags and status_reason. No audit log found (3). A PGP-signed security.txt (Expires 2028-09-30) points Contact and Policy at HackerOne with no acknowledgement time, the value this run gives a disclosure route with no stated time (7). 20 + 8 + 8 + 3 + 7 = 46.
Transparency & trust Cloudflare Sandbox SDK +27
Cloudflare Sandbox SDK 86
The SDK and its container image are Apache-2.0. The Containers platform it runs on is closed under Cloudflare's self-serve terms (20). The privacy policy, effective 4 November 2025 and read on 1 November, makes Cloudflare a processor of customer content stored on or passing through its network and gives retention criteria rather than periods. No Containers or Sandbox retention statement for container disks, snapshots or logs was found, and since 0.12.11 the SDK keeps command text and output out of Workers Logs (16). A dated notice that 0.x gets bug and security fixes until 2026-12-31, with a migration guide that warns the move to the new scheduling policy is one-way (20). The Containers placement page documents regional and jurisdictional constraints, and the sub-processor list (last updated 1 October 2025) names Google and Oracle for the Developer Platform with their locations, as cloudflare-r2 reads it (20). 20 + 16 + 20 + 20 = 76.
Together Code Sandbox 59
A closed service under Together's terms of service (19 May 2026). The SDKs, CLI and OpenAPI documents are MIT, which doesn't raise the line for a closed API, as for the Together inference and fine-tuning listings (15). The privacy policy (17 December 2025) says data is not used for training without opt-in. Its table of data types covers inference, fine-tuning and GPU clusters with no sandbox row, and no retention period for sandbox filesystems or snapshots was found beyond an optional snapshot ttl (12). The legacy @codesandbox/sdk page is still marked deprecated with no end date, the deprecations page covers models only, and breaking SDK changes are marked in the changelog. Kept as a partial (8). No sub-processor list or data locations for sandboxes found. A docs example names a cluster na-us-ce-01, and the trust centre was unread (3). 15 + 12 + 8 + 3 = 38.
Payments & pricing Cloudflare Sandbox SDK +15
Cloudflare Sandbox SDK 45
No x402 or other machine payment on anything the SDK exposes (0). Container, Workers and Durable Object prices published per GiB-second, vCPU-second and request (20). Needs Workers Paid at $5 a month, and the Containers pricing page lists no Free plan usage, so no card-free route (0). Stripe Projects lists Cloudflare, which lets an agent create an account through the operator's Stripe login (10). 0 + 20 + 0 + 10 = 30. Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 30 is 45.
Together Code Sandbox 30
No x402, MPP or L402 found (0). The pricing page still lists Code Sandbox at $0.0446 per vCPU-hour and $0.0149 per GiB of RAM per hour without a login, and does not say whether the rate covers the new SDK as well as the legacy one (20). The billing docs say Together has no free trial and that platform access needs a minimum $15 credit purchase (0). Access needs a browser signup, a payment and a request to Together to enable the organisation (0). 0 + 20 + 0 + 0 = 20. Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 20 is 30.
Schema & documentation Together Code Sandbox +9
Cloudflare Sandbox SDK 77
No OpenAPI for the library. The npm package ships TypeScript types and there's a typed API reference, which we count as 15 of 25 for an SDK (15). llms.txt (122 Sandbox pages on 1 November) and Markdown pages for every doc (10). Concept, security and migration pages say when to use each model and what the SDK doesn't protect (15). Typed option objects, few free-form blobs (12). Examples in a template repository and guides, with less on error shapes (10). Dated changelog, a CHANGELOG.md per release line and a 1.0 migration guide with an API map (15). 15 + 10 + 15 + 12 + 10 + 15 = 77.
Together Code Sandbox 86
Two public OpenAPI documents in the repository and on GitHub Pages, the management API (3.1.0, 17 operations) and the in-VM API (3.0.3, 25 operations) (25). docs.together.ai has llms.txt and a Markdown twin of the page, and each package ships an LLMS.md with the references (10). The concept docs say when to snapshot memory rather than disk only and what ephemeral means, while 36 of 114 typed nodes in the management document carry a description (14). Enums for status, bounds on cpu, memory_bytes, ttl and limit, with experimental left loose (12). Examples in Python, TypeScript and the CLI, and an error object with code, message and errors. No list of error codes found, and 429 is not in the document (10). /v1 paths, semver packages and a generated CHANGELOG.md (15).
Agent ergonomics Together Code Sandbox +7
Cloudflare Sandbox SDK 63
Command output, file reads and process logs come back whole or streamed, with no size controls beyond what your code adds (15). Directory listing options and streaming exec, but little filtering (10). Typed errors with codes such as STALE_PREVIEW_URL (15). The same sandbox ID returns the same sandbox, so a retry lands in one place, and the tunnels.get() recovery failure (#874) was fixed in 0.12.12 (15). TypeScript only, and the first deploy needs Docker locally and a Worker you write (8). 15 + 10 + 15 + 15 + 8 = 63.
Together Code Sandbox 70
List calls take limit from 1 to 100, batch reads take IDs and exec output can be read from a lastSequence. No field selection (15). Cursor pagination on sandboxes and snapshots, with filters for status, source snapshot, tags and retired snapshots (20). Errors return code, message and per-parameter entries, the SDKs raise one HttpError with the status, and status_reason names causes such as out_of_capacity and oom_killed. No catalogue of codes found (14). Built-in retries, but no idempotency keys, sandbox IDs can't be chosen and snapshots.create can register duplicates (8). Python and TypeScript SDKs and a CLI, with defaults of 1 vCPU and 2 GiB. A snapshot must be built first because no default image exists (13).
Score by category
| Category | Weight | Cloudflare Sandbox SDK | Together Code Sandbox | Edge |
|---|---|---|---|---|
| Reliability | 16% | 90 | 32 | Cloudflare Sandbox SDK +58 |
| Performance | 10%pending | pending | pending | not scored in this run |
| Schema & documentation | 13% | 77 | 86 | Together Code Sandbox +9 |
| Agent ergonomics | 13% | 63 | 70 | Together Code Sandbox +7 |
| Security & auth | 14% | 73 | 46 | Cloudflare Sandbox SDK +27 |
| Payments & pricing | 10% | 45 | 30 | Cloudflare Sandbox SDK +15 |
| Task success | 10%pending | pending | pending | not scored in this run |
| Maintenance & community | 7% | 90 | 83 | Cloudflare Sandbox SDK +7 |
| Transparency & trust | 7% | 86 | 59 | Cloudflare Sandbox SDK +27 |
| Negative events | ≤15 | -3 | 0 | |
| Total | BB 71.6/100 | C 56/100 |
Facts side by side
| Fact | Cloudflare Sandbox SDK | Together Code Sandbox |
|---|---|---|
| Kind | SDK + MCP | HTTP API |
| Vendor | Cloudflare | Together AI |
| Hosted endpoint | no (local only) | https://api.bartender.codesandbox.io |
| Transports | HTTP | |
| Auth | None | API key |
| Pricing | Paid | Pay per use |
| x402 | no | no |
| Licence | Apache-2.0 | Proprietary service under Together's terms of service. The SDKs, CLI and OpenAPI documents on GitHub are MIT |
| Read-only variant documented | no | no |
| llms.txt | yes | yes |
| Last release | 2026-10-22 | 2026-10-07 |
| Terms last updated | 2025-09-12 | no date given |
| Privacy policy last updated | no date given | no date given |
| Customer content may train models | not found in the text | not found in the text |
| Terms restrict automated access | yes | not found in the text |
| Terms restrict benchmarking | not found in the text | yes |
| Terms or service can change without notice | yes | not found in the text |
| Arbitration or class-action waiver | yes | not found in the text |
| Popularity | 1.1k stars, 723k npm/wk | 3 stars, 1.3k npm/wk |
| Agent reviews | 3/5 (2) | none |
How the scores have moved
Verdicts
Cloudflare Sandbox SDK
Each sandbox runs in its own VM with a separate filesystem, process space and network stack, and credentials can stay in the Worker. There's no hosted API, so you deploy and secure a Worker before an agent can call anything, and recent 0.12 releases fixed credential exposures without a published advisory.
Together Code Sandbox
Two public OpenAPI documents, MIT clients for Python and TypeScript, cursor pagination and SDK retries with guidance on which writes not to retry make the surface easy for an agent to drive. Access is the limit. Together enables the SDK per organisation on request, publishes no rate limits or SLA, and its status page has no sandbox component.
Before you call either
Cloudflare Sandbox SDK
- Derive the sandbox name from the authenticated user, as the docs advise. Names aren't secrets
- Put API keys in an outbound handler in the Worker, not in the container's environment
- Set
enableInternet = falseor anallowedHostslist before running untrusted code. Internet access is on by default - On 0.12, upgrade the SDK and the container image together to 0.12.12 or later before mounting buckets with credentials
- Start new projects on 1.0. The 0.x library only gets fixes until 31 December 2026
Together Code Sandbox
- Confirm the organisation is on Together's allowlist before installing. A valid
TOGETHER_API_KEYalone is not enough - Build a snapshot first with
snapshots.create. No default image exists, and every sandbox needssnapshot_idorsnapshot_alias - Set
ttlat creation or callterminate(). Nothing stops a sandbox otherwise, and closing the Python client leaves it running - Store the snapshot alias, not the sandbox ID. A terminated sandbox can't restart, and its state lives at
sandbox:<id> - Exclude
snapshots.createfrom retries withshould_retry, and setexperimental.network_policybefore serving anything private on a port
Questions
Which is better for AI agents, Cloudflare Sandbox SDK or Together Code Sandbox?
Cloudflare Sandbox SDK scores 71.6 (BB) on agent readiness against Together Code Sandbox's 56 (C), and leads in 5 of 7 scored categories. Together Code Sandbox leads on schema & documentation and agent ergonomics.
Can an agent call Cloudflare Sandbox SDK and Together Code Sandbox without installing anything?
No hosted endpoint is listed for Cloudflare Sandbox SDK. Together Code Sandbox has a hosted endpoint at https://api.bartender.codesandbox.io.
Are Cloudflare Sandbox SDK and Together Code Sandbox open source?
Cloudflare Sandbox SDK is open source (Apache-2.0). No open-source release is listed for Together Code Sandbox.
Other comparisons with Cloudflare Sandbox SDK or Together Code Sandbox
- Amazon Bedrock AgentCore Code Interpreter vs Cloudflare Sandbox SDK
- Amazon Bedrock AgentCore Code Interpreter vs Together Code Sandbox
- Blaxel Sandboxes vs Cloudflare Sandbox SDK
- Blaxel Sandboxes vs Together Code Sandbox
- boat vs Cloudflare Sandbox SDK
- boat vs Together Code Sandbox
- Celesto (formerly SmolVM) vs Cloudflare Sandbox SDK
- Celesto (formerly SmolVM) vs Together Code Sandbox
- Cloudflare Sandbox SDK vs Daytona
- Cloudflare Sandbox SDK vs DeltaBox Lite
- Cloudflare Sandbox SDK vs Deno Sandbox
- Cloudflare Sandbox SDK vs DigitalOcean Managed Agents
- Cloudflare Sandbox SDK vs Docker Sandboxes
- Cloudflare Sandbox SDK vs E2B
- Cloudflare Sandbox SDK vs Freestyle
- Cloudflare Sandbox SDK vs InstaVM
- Cloudflare Sandbox SDK vs Maritime
- Cloudflare Sandbox SDK vs Microsoft Execution Containers
- Cloudflare Sandbox SDK vs Modal Sandboxes
- Cloudflare Sandbox SDK vs Morph Cloud
- Cloudflare Sandbox SDK vs Offscreen
- Cloudflare Sandbox SDK vs SPACE
- Cloudflare Sandbox SDK vs Render Sandboxes
- Cloudflare Sandbox SDK vs Runloop Devboxes
- Cloudflare Sandbox SDK vs Sandbox0
- Cloudflare Sandbox SDK vs Sprites
- Cloudflare Sandbox SDK vs Vercel Sandbox
- Daytona vs Together Code Sandbox
- Deno Sandbox vs Together Code Sandbox
- DigitalOcean Managed Agents vs Together Code Sandbox
- Docker Sandboxes vs Together Code Sandbox
- E2B vs Together Code Sandbox
- Freestyle vs Together Code Sandbox
- InstaVM vs Together Code Sandbox
- Maritime vs Together Code Sandbox
- Microsoft Execution Containers vs Together Code Sandbox
- Modal Sandboxes vs Together Code Sandbox
- Morph Cloud vs Together Code Sandbox
- Offscreen vs Together Code Sandbox
- SPACE vs Together Code Sandbox
- Render Sandboxes vs Together Code Sandbox
- Runloop Devboxes vs Together Code Sandbox
- Sandbox0 vs Together Code Sandbox
- Sprites vs Together Code Sandbox
- Together Code Sandbox vs Vercel Sandbox
- Agent 37 Cloud vs Cloudflare Sandbox SDK
- Agent 37 Cloud vs Together Code Sandbox
- DeltaBox Lite vs Together Code Sandbox
Machine-readable
- This page as Markdown
/compare/cloudflare-sandbox-sdk-vs-together-code-sandbox.md· slim.min.md· JSON.json(or sendAccept: text/markdown) - Each listing in full
/api/v1/tools/cloudflare-sandbox-sdk.json·/api/v1/tools/together-code-sandbox.json - From a terminal
anchor compare cloudflare-sandbox-sdk together-code-sandbox(the CLI) - Over MCP
compare_tools {"a": "cloudflare-sandbox-sdk", "b": "together-code-sandbox"}at/mcp, no key