The decision every team faces
Your engineering team wants AI agents. The agents need compute: sandboxes for code execution, browsers for web automation, desktops for GUI applications. The question is where that compute comes from.
Three options:
- Build it yourself on AWS/GCP with EC2, cloud containers, and custom orchestration.
- Use a sandbox-as-a-service platform (E2B, Modal, Daytona, Runloop, or us).
- Use the agent's built-in compute (Devin's sandbox, Codex's containers, Cursor's cloud VMs).
Each has tradeoffs. This guide is honest about all three — including where we're not the right choice.
Option 1: Build it yourself
What it takes
Building AI agent infrastructure from scratch means building a sandbox orchestration layer. Here's the bill of materials:
| Component | What you build | Effort |
|---|---|---|
| Compute provisioning | EC2 launch automation, cloud container definitions, security groups, VPC config | 2–4 weeks |
| Lifecycle management | Start, stop, reboot, delete. Auto-stop on idle. Health checks. | 2–3 weeks |
| Browser containers | Chrome/Firefox in cloud containers, CDP exposure, proxy routing, session management | 3–6 weeks |
| Desktop containers | XFCE/KDE in cloud containers, VNC access, noVNC proxy, display server | 3–6 weeks |
| Warm pools | Pre-provisioning, health recycling, claim/release, state machine | 3–4 weeks |
| SSH access | Key management, certificate authority, short-lived certs | 1–2 weeks |
| File I/O | Upload/download API, multipart handling, workspace tarballs | 1–2 weeks |
| Command execution | Execute API, stdout/stderr capture, WebSocket terminal | 1–2 weeks |
| Cost tracking | Per-sandbox billing, per-user limits, monthly reports | 2–3 weeks |
| Multi-tenancy | Org isolation, RBAC, cross-tenant prevention | 2–4 weeks |
| Proxy & networking | DNS routing, session tokens, forward-auth, TLS termination | 2–4 weeks |
| Audit logging | Immutable log, SIEM export, compliance reporting | 1–2 weeks |
| Total | 23–42 weeks (6–10 months) | |
Plus ongoing maintenance: security patches, AWS API changes, scaling issues, on-call. Expect 0.5–1 FTE of permanent platform engineering time.
When to build
- You're a platform company and agent infrastructure is your product (you're building the next E2B).
- You have strict data residency requirements that no managed platform can meet (government, defense, certain healthcare).
- You already have a container orchestration team and the marginal effort to add sandbox capabilities is small.
- You need capabilities no platform offers (custom hardware, bare-metal GPU, exotic network topologies).
When not to build
If you're building agent infrastructure so your team can run Claude Code on cloud VMs, you're spending 6 months and $200K+ in engineering time to solve a problem that a managed platform solves in an afternoon. The opportunity cost — 6 months of your platform team not building your actual product — is the real expense.
Option 2: The managed platform landscape
The sandbox-as-a-service market has grown fast since 2024. Here's the honest comparison as of March 2026:
| Platform | Focus | Terminal | Browser | Desktop | Warm pools | Persistent storage | Pricing model |
|---|---|---|---|---|---|---|---|
| E2B | Code execution sandboxes | Yes | No | No | Yes | Limited | Per-second compute |
| Modal | Serverless compute (ML focus) | Yes | No | No | Yes | Volumes | Per-second compute |
| Daytona | Dev environments | Yes | No | No | No | Yes | Per-workspace |
| Fly.io | App deployment (Machines API) | Yes | DIY | No | No | Volumes | Per-second compute |
| Runloop | AI agent sandboxes | Yes | Beta | No | Yes | Yes | Per-second compute |
| Sandbox Platform (us) | Full AI workstation | Yes | Yes (6 types) | Yes (4 types) | Yes | Yes | Per-second compute |
Where each platform wins
E2B
Best-in-class for pure code execution sandboxes. Fastest cold start in the market (~300ms for their Firecracker-based VMs). Strong Python/TypeScript SDK. If your agents only need to execute code in a terminal and you don't need browsers or desktops, E2B is a strong choice. Raised $14.4M, well-funded, growing fast.
Modal
Best for ML/GPU workloads. Native GPU scheduling, container image caching, and a Python-first SDK that makes serverless GPU feel native. If your primary use case is ML inference or training, Modal is purpose-built for it. Not designed for interactive agent workloads (no SSH, no browser, no desktop).
Daytona
Open-source, self-hostable dev environments. Best if you want to run the platform on your own infrastructure with full control. Devcontainer-compatible. Doesn't have browser or desktop containers — it's focused on coding environments.
Fly.io
General-purpose container hosting with the Machines API for programmatic lifecycle control. Cheapest option for always-on VMs. You can build browser/desktop support yourself using their containers, but it's DIY. Best if you want low-level control and don't mind building the agent-specific layer.
Runloop
AI-agent-specific sandbox platform. Similar to E2B but with persistent storage and a focus on long-running agent tasks. Browser support in beta. Good Python SDK.
Where we win
We're the only platform that gives the agent the complete workstation: terminal + browser + desktop. If your agents need to:
- Execute code AND browse the web AND operate GUI applications
- Run 50 Chrome instances in parallel with CDP control
- Open LibreOffice on a desktop and interact via computer-use vision
- Use warm pools for instant browser/desktop claiming
- Track costs per department with spending caps
…then no other platform covers all of these today. If your agents only need terminal execution, E2B or Modal may be simpler and cheaper for that specific use case.
Option 3: Use the agent's built-in compute
Some agents bundle their own compute:
| Agent | Built-in compute | Limitation |
|---|---|---|
| Devin | Full cloud sandbox per task | Locked to Devin's model. $9/hour. Can't use Claude or GPT. |
| OpenAI Codex | Isolated containers per task | Locked to OpenAI models. No internet by default. No browser/desktop. |
| Cursor (cloud) | Ubuntu VMs, up to 8 parallel | Locked to Cursor ecosystem. No browser containers. |
| GitHub Copilot | GitHub Actions runners | Locked to GitHub ecosystem. Limited customization. |
The tradeoff is clear: bundled compute is convenient but creates lock-in. You can't run Claude on Devin's sandbox. You can't use Codex's containers with a LangChain agent. Each tool built its own walled garden. A managed platform gives you any agent on any compute.
The decision matrix
| If you need... | Best option |
|---|---|
| Terminal-only code execution, fastest cold start | E2B |
| GPU/ML inference, serverless Python | Modal |
| Self-hosted, open-source dev environments | Daytona |
| Cheap always-on VMs with low-level control | Fly.io |
| Terminal + browser + desktop (full AI workstation) | Sandbox Platform |
| Complete control, data residency, 6+ months to build | Build yourself |
| One specific agent (Devin/Codex/Cursor) only | Use their built-in compute |
The real cost of building
The direct cost (engineering time) is the visible part. The invisible cost is opportunity: your platform team spent 6 months building sandbox infrastructure instead of building your product. That's the cost that matters most for startups and growth-stage companies.
Building a basic sandbox (EC2 launch + execute command) takes 2 weeks. Getting to production quality (warm pools, multi-tenancy, cost tracking, browser containers, desktop containers, session management, proxy routing, audit logging) takes 6–10 months. The first 80% feels fast. The last 20% takes 5x longer than everything before it. Every team that builds this underestimates the tail.
What's next
Ship next week, not next quarter
Terminal. Browser. Desktop. Warm pools. Cost tracking. Multi-tenancy. All of it, out of the box.
Get Started Free