

Top BYOC AI sandboxes for running untrusted code in 2026
AI agents and code-executing developer tools need a safe place to run untrusted code without breaking security or networking boundaries.
This guide compares the top bring your own cloud (BYOC) AI sandboxes and shows what to evaluate when execution must run inside your VPC.
If sandbox workloads must run inside your own cloud account or VPC, the decision usually comes down to deployment model, isolation, lifecycle design, and operational overhead.
Top BYOC AI sandboxes (compared):
-
Northflank – Provides secure sandboxes that can run on Northflank's managed cloud or deploy inside your own infrastructure (AWS, GCP, Azure, Oracle, CoreWeave, on-premises, or bare-metal) with microVM-based isolation options (Kata Containers, Firecracker, and gVisor) and support for both ephemeral and persistent environments.
Note: Northflank Sandboxes can run alongside APIs, workers, databases, and CPU or GPU workloads in the same control plane. BYOC is available self-serve. Northflank has been in production since 2021 across startups, public companies, and government deployments.
-
Daytona – Sandbox environments for AI agent and code execution workflows that can run on customer-managed compute inside your own cloud or on-prem, with Daytona providing the control plane.
-
E2B – API-driven sandbox sessions for agent execution with a BYOC deployment option that runs sandboxes inside your own VPC. Currently available for only AWS and offered to enterprise customers only.
If BYOC is the non-negotiable requirement: Prioritize platforms where the execution plane runs inside your cloud, then compare isolation, lifecycle, and networking controls. Northflank supports self-serve BYOC across AWS, GCP, Azure, Oracle, CoreWeave, and on-premises infrastructure, with microVM-based isolation (Kata Containers, Firecracker, and gVisor), and both ephemeral and persistent environments, with platform-managed orchestration.
A BYOC AI sandbox is a programmable execution environment for running untrusted code where the execution plane runs inside infrastructure you control, such as your cloud account or VPC, while the platform may still provide APIs, lifecycle automation, and orchestration.
This becomes relevant when sandbox workloads must access private services, comply with internal security policies, or remain inside regulated infrastructure boundaries. Instead of routing execution through vendor infrastructure, you keep compute where your systems and data already live.
You typically start evaluating BYOC sandboxes when sandbox execution can no longer happen outside your infrastructure boundary.
Common triggers include agent workloads needing private API access, internal data processing requirements, strict network egress policies, or organizational constraints around data residency and infrastructure ownership. In these cases, the sandbox platform must integrate with your network rather than sit in front of it.
When you compare BYOC sandbox platforms, most decisions come down to a consistent set of technical dimensions:
- Deployment model: whether sandbox execution runs inside your infrastructure and how control plane separation works
- Isolation model: microVM-based isolation versus container isolation and the associated security posture
- Lifecycle design: ephemeral sessions, persistent environments, warm pools, and state management patterns
- Networking controls: outbound restriction, inbound posture, and private connectivity integration
- Interfaces: API, SDK, CLI, and SSH ergonomics for automation and integration
- Operational overhead: what infrastructure components you must operate when using BYOC
The platforms below represent the current set of sandbox solutions that support execution inside customer infrastructure.
Northflank provides microVM-backed sandbox environments that run inside your own infrastructure (across AWS, GCP, Azure, Oracle, CoreWeave, on-premises, or bare-metal) while remaining part of a full workload runtime platform.
This is particularly relevant when sandbox workloads must run alongside production services, databases, and GPU workloads without requiring a separate platform. Northflank has been operating microVMs at scale in production since 2021 across startups, public companies, and government deployments.

Key characteristics:
- Deployment model: Supports BYOC deployment into your own AWS, GCP, Azure, Oracle, CoreWeave, on-premises, or bare-metal infrastructure, allowing sandbox execution to run inside infrastructure you control, including customer VPCs, while Northflank manages orchestration. Available self-serve, with no enterprise-only gatekeeping.
- Isolation: Uses microVM-based isolation (Kata Containers, Firecracker, and gVisor) applied based on workload type, enabling strong VM-level isolation suited to untrusted code execution across multi-tenant environments.
- Lifecycle: No forced time limits (run sandboxes for seconds or weeks). Supports both ephemeral and persistent environments, allowing teams to combine short-lived execution pools with long-running stateful services. Persistent volumes, S3-compatible storage, and stateful databases can be attached and run in the same platform.
- Interfaces: Provides UI, API, CLI, SSH, and GitOps access for creating, managing, and interacting with sandbox environments as part of automated workflows or agent pipelines.
- Operational considerations: Infrastructure ownership and networking remain in your cloud or on-prem environment. Northflank abstracts scheduling, orchestration, autoscaling, bin-packing, CI/CD, and lifecycle management, including microVM provisioning and multi-tenant isolation, so you don't have to build or maintain that stack.
- Workload scope: Sandbox environments run alongside APIs, workers, databases, and CPU or GPU workloads in the same control plane. On-demand GPUs (H100s and others) are available without quota requests at $2.74/hour (up to 62% cheaper than major cloud providers). CPU is priced at $0.01667/vCPU/hour (up to 65% cheaper than major cloud providers), reducing the need for separate runtime systems as workload requirements grow.
Understand how Northflank sandboxes run inside your infrastructure and how BYOC deployments work:
- How Northflank sandboxes are provisioned and used for secure code execution - https://northflank.com/product/sandboxes
- How bring your own cloud deployments allow workloads to run inside your cloud accounts - https://northflank.com/product/bring-your-own-cloud
- How sandbox workloads can be deployed directly into customer VPC environments - https://northflank.com/product/customer-vpc-deployments
- How Northflank operates within your infrastructure boundaries and deployment architecture - https://northflank.com/features/bring-your-own-cloud
- How microVM sandbox environments are created using Firecracker, gVisor, and Kata Containers - https://northflank.com/blog/how-to-spin-up-a-secure-code-sandbox-and-microvm-in-seconds-with-northflank-firecracker-gvisor-kata-clh
Daytona provides stateful, isolated sandbox environments designed primarily for AI agent and code execution workflows, with a customer-managed compute option that allows sandboxes to run inside your own cloud or on-prem infrastructure while Daytona retains control plane management.
Key characteristics:
- Deployment model: Supports a customer-managed compute deployment pattern where sandboxes run on isolated infrastructure inside your cloud or on-prem, with Daytona providing the control plane.
- Isolation: Docker-based sandbox environments with support for standard Docker images, Dockerfile configurations, Docker Compose, and Docker-in-Docker, providing container-level isolation for AI-generated code.
- Lifecycle: Stateful by design, with sandboxes that run indefinitely and support environment snapshots that can be saved, restored, and resumed.
- Interfaces: SDK, API, and CLI-driven workflows for environment creation, lifecycle control, and integration into automation pipelines.
- Operational considerations: Requires operating and scaling the infrastructure layer that hosts sandbox environments when deployed in BYOC mode.
E2B provides API-driven sandbox sessions designed for agent execution workflows with a BYOC deployment option (only available for AWS and enterprise customers) that deploys sandboxes inside the customer's own VPC.
Key characteristics:
- Deployment model: Supports a BYOC deployment pattern where sandboxes are deployed inside the customer's VPC, with E2B retaining control plane management. Currently available on AWS only. BYOC is offered to enterprise customers only.
- Isolation: microVM-based isolation powered by Firecracker, designed to execute untrusted agent-generated code safely with full workload isolation.
- Lifecycle: Programmatic sandbox lifecycle with configurable timeouts, up to 24 hours on the Pro tier (1 hour on the Base tier), and support for sandbox persistence and snapshots. Sandboxes are created, managed, and terminated via SDK or API.
- Interfaces: SDK-first interaction model (Python and JavaScript/TypeScript), with REST API, CLI, and SSH access, designed for integration with agent frameworks and orchestration layers.
- Operational considerations: In BYOC deployments, the customer manages the VPC, AWS account, and compute nodes (orchestrators and edge controllers). E2B manages the control plane.
Use this framework to map your requirements to the platform characteristics and solutions that typically drive the decision.
| If your priority is… | Focus on evaluating… | Platform | Fit |
|---|---|---|---|
| Running sandboxes inside your VPC | Deployment model | Northflank | Self-serve BYOC across AWS, GCP, Azure, Oracle, CoreWeave, on-prem, and bare-metal |
| Daytona | Customer-managed compute, cloud or on-prem | ||
| E2B | Customer VPC, AWS only, enterprise only | ||
| Strong isolation for untrusted code | Isolation model | Northflank | Kata Containers, Firecracker, and gVisor, applied per workload |
| Daytona | Docker-based isolation | ||
| E2B | Firecracker microVM isolation | ||
| Mixing short-lived and long-running workloads | Lifecycle model | Northflank | Ephemeral and persistent, no time limits |
| Daytona | Stateful, runs indefinitely | ||
| E2B | Up to 24 hours, persistence supported | ||
| Accessing private services or datasets | Networking | Northflank | Inside your VPC across any cloud, on-prem, or bare-metal |
| Daytona | Customer-managed compute, cloud or on-prem | ||
| E2B | Inside customer VPC, AWS only, enterprise only | ||
| Minimizing infrastructure overhead | Operational responsibility | Northflank | Platform-managed orchestration, autoscaling, and microVM provisioning; in production since 2021 |
| Daytona | Customer operates the infrastructure layer | ||
| E2B | Customer manages compute nodes | ||
| Running other workloads alongside sandboxes | Workload scope | Northflank | Sandboxes, services, jobs, databases, and CPU/GPU in one control plane |
| Daytona | Sandbox-focused | ||
| E2B | Sandbox-focused |
Common questions about how BYOC sandbox platforms work and what to consider when evaluating them.
BYOC (bring your own cloud) means sandbox execution runs inside infrastructure you control, such as your cloud account or VPC, while the platform handles orchestration, APIs, and lifecycle management.
Self-hosted sandboxes require you to operate the full runtime stack yourself. BYOC separates control plane and execution plane responsibilities, so execution runs in your infrastructure while the platform manages orchestration. Some platforms, such as Northflank, extend this to on-premises and air-gapped environments for regulated industries and government deployments.
Agent systems frequently execute untrusted code while interacting with internal APIs or private services. Running sandboxes inside your infrastructure enables secure connectivity to those systems while maintaining workload isolation.
Support varies by platform. Some cap session length (for example, E2B's Pro tier limits sessions to 24 hours). Others, like Northflank, support both ephemeral and persistent environments with no forced time limits.
It depends on the platform model. Some approaches require you to manage and scale the infrastructure layer directly. Others, like Northflank, abstract orchestration and microVM provisioning while still keeping execution inside your infrastructure.
If you’re evaluating sandbox platforms or designing secure execution infrastructure, these guides expand on adjacent decisions and architectural tradeoffs.
- Top AI sandbox platforms for code execution: Compare leading sandbox platforms across isolation models, lifecycle design, and operational responsibility.
- Self-hosted AI sandboxes: Understand how DIY, self-hosted, and BYOC sandbox approaches differ and what changes operationally.
- Best code execution sandbox for AI agents: Learn which runtime characteristics matter most for agent workloads, including lifecycle and network access.
- How to sandbox AI agents: Learn how different isolation strategies reduce risk when agents execute generated code.
- How to spin up a secure code sandbox and microVM in seconds with Northflank: A step-by-step guide to deploying microVM-backed services using Firecracker, gVisor, and Kata Containers inside a secure multi-tenant project