Sandbox · CODE

Code Runtime

Python and Node sandboxes for short evals, code generation, and tool use.

Code Runtime sandboxes

The most-requested sandbox type. Spin up a Python or Node process with a dependency-managed environment, run code, capture stdout/stderr/return values, and tear it down. No persistent state by default; opt into a per-tenant volume if you need it.

Dependency manifests

Upload any of: uv.lock (preferred for Python — fast, reproducible), requirements.txt (classic pip), package.json + lockfile (Node/Deno). We cache the resolved environment per-manifest hash; subsequent spin-ups reuse the warm image.

Execution model

  • Cold start: ~600 ms typical, including manifest-warm dependency env
  • Wall-clock limit: 5 minutes per call by default; raise via tenant config
  • CPU: 1 vCPU burstable, 0.25 vCPU sustained — fair-share, not dedicated
  • Memory: 512 MB default; raise to 2 GB on Agent Pro or per-sandbox upgrade
  • Filesystem: Ephemeral by default, or attach a per-tenant 5 GB volume

What we don’t allow

  • Long-running daemons (use Linux Container sandboxes for that)
  • Outbound network to private IP ranges (CGNAT, RFC1918) without allowlist
  • Anything that would let one tenant see another’s process state

Best for

  • Function-calling agents that need to evaluate small code snippets
  • Reproducible Python eval with pinned dependencies
  • Per-message Node tool execution
  • Data transformation steps inside an agent loop