e2b-dev/runtime
The runtime behind every E2B stack: Cloud, Enterprise, and your own machine.
What it solves
E2B Runtime provides a secure, isolated environment for AI agents to execute untrusted code. It eliminates the slow boot times of traditional virtual machines by using snapshot-based restoration, allowing agents to have their own dedicated Linux machines that can be paused, resumed, and forked instantly.
How it works
The system leverages Firecracker microVMs and a custom architecture to separate the control plane (API) from the data plane (execution). Instead of booting a kernel from scratch, it restores pre-booted VM templates from object storage. It uses userfaultfd for lazy memory loading and a copy-on-write overlay for the filesystem, ensuring only necessary data is fetched. Inside each VM, a specialized agent called envd provides a REST and Connect RPC API for managing processes, files, and ports.
Who it’s for
- AI Agent Developers: Teams needing precise control over the sandbox environment and local-to-production parity.
- Platform Teams: Organizations requiring agent execution within their own cloud infrastructure to avoid "black box" solutions.
- Infrastructure Engineers: Those interested in high-scale snapshot-based scheduling, Firecracker microVMs, and lazy memory restoration.
Highlights
- Hardware-isolated sandboxes: Each session runs in its own Firecracker microVM with dedicated network namespaces and egress firewalls.
- Instant Lifecycle: Ability to pause, resume, and fork running sandboxes via memory and disk diffing.
- Template System: Layered builds from Docker images with cached layers and boot-optimization passes.
- Integrated API:
envdallows SDKs to interact with the VM's filesystem and processes without dropping workloads during upgrades. - Dynamic Routing: Automatic sandbox URLs for any process that opens a port, routed via an edge proxy.
Related
- Project
- Project
- Project
- Project