e2b-dev/runtime

▲ 115 stars today★ 1,551⑂ 427

The runtime behind every E2B stack: Cloud, Enterprise, and your own machine.

About e2b-dev/runtime

e2b-dev/runtime is an open-source project on GitHub, mainly written in Go. The runtime behind every E2B stack: Cloud, Enterprise, and your own machine. It currently holds 1,551 stars and 427 forks with 201 open issues, and was last pushed on 2026-09-16 (repository created 2023-08-10).

Project Overview

Git Homed tracks it on the Today's Trending board, currently at rank #58 with 115 new stars today.

GitHub Repository Details

Repository e2b-dev/runtime · default branch main · size 94390 KB · watchers 10 · source: GitHub REST API and repository README

README

https://github.com/e2b-dev/runtime/blob/HEAD/E2B Runtime

E2B Runtime

The open-source runtime behind E2B, the AI agent cloud. Firecracker microVMs that resume from a snapshot, run untrusted agent code, and pause when the agent stops.

License: Apache-2.0 Go GitHub stars Discord X

Docs | Architecture | Run it yourself | SDKs & CLI | Cookbook | Contributing

---

What is E2B Runtime?

E2B Runtime is the complete backend that powers E2B Cloud: the control-plane API, the per-node orchestrator that drives Firecracker, the agent that runs inside every VM, the edge router for sandbox traffic, and the template builder. It gives every agent session its own isolated Linux machine that boots from a snapshot, runs whatever the agent asks it to, and can be paused and resumed as if nothing happened.

It is written in Go, licensed under Apache-2.0, and built by E2B. The same code serves the public cloud, dedicated enterprise deployments, and the single-machine Embed package you can run on your own hardware.

Why it's fast

Two ideas drive the design.

A sandbox is a resumed snapshot. Templates are pre-booted VMs (memory, disk, and machine state) stored in object storage. "Creating" a sandbox means restoring one, not booting a kernel. Memory pages are served lazily on page fault through userfaultfd, and the root filesystem is a copy-on-write overlay over a read-only image, so only the data a sandbox actually touches is ever fetched. Fresh creates, resumes after a pause, and forks all take the same path.

Control plane and data plane never mix. The API decides where a sandbox runs and records that it runs. The orchestrator on each node owns how it runs: the Firecracker process, the network namespace, the block device, the cgroup. Sandbox traffic goes straight from the edge to the node and never passes through the API.

What you get

Run it

On E2B Cloud. The fastest way to use the runtime is to not run it. Grab an API key at e2b.dev and start a sandbox from the JavaScript or Python SDK:

from e2b import Sandbox

with Sandbox.create() as sandbox: result = sandbox.commands.run('echo "Hello from E2B!"') print(result.stdout)

On one machine you own. E2B Embed is the whole stack, real Firecracker sandboxes included, on a single Linux host with KVM. Two files and one command:

mkdir e2b && cd e2b
curl -fsSL --remote-name-all "https://raw.githubusercontent.com/e2b-dev/runtime/main/embed/compose/{compose.yaml,.env}"
docker compose up -d --wait

The same package ships as Terraform for GCP and as a Kubernetes manifest. It is an evaluation package, not a production deployment pattern.

In your own cloud, for production. E2B runs the runtime as a dedicated deployment inside your account, with your data staying there. See e2b.dev/enterprise.

How it fits together

SDK / CLI ──REST──▶ API ──gRPC──▶ orchestrator ──▶ Firecracker microVM ──▶ envd ──▶ your processes
                     │                 │
                     ├── PostgreSQL    ├── object storage (templates, snapshots)
                     ├── Redis         └── ClickHouse (events, metrics)
                     └── ClickHouse

browser ──https://-.──▶ client-proxy ──▶ orchestrator proxy ──▶ envd

| Service | Package | Runs on | Purpose | |---|---|---|---| | API | packages/api | control plane | Public REST API: sandbox lifecycle, placement, auth, quotas | | Orchestrator | packages/orchestrator | every sandbox node | Runs Firecracker VMs: create, pause, resume, kill, checkpoint | | Template manager | packages/orchestrator (role) | build nodes | Builds templates from Docker images and build steps | | Client proxy | packages/client-proxy | control plane | Edge router: sandbox URL to the right node, auto-resume on traffic | | Envd | packages/envd | inside every VM | Process, filesystem, and port API the SDKs use | | Dashboard API | packages/dashboard-api | control plane | Backend for the web dashboard |

docs/ARCHITECTURE.md has the full picture: sequence diagrams for creation, traffic, pause and resume, and template builds, plus the data stores and the deployment topology. Read it first.

Who is this for?

Developing

The runtime needs Linux with KVM. DEV-LOCAL.md walks through the host prep, the local stack, and running services from source.

make local-infra        # PostgreSQL, Redis, ClickHouse, monitoring
make test               # unit tests across packages
make test-integration   # against a live deployment
make generate           # OpenAPI, proto, sqlc
make fmt lint tidy

Releases are per package and follow conventional commits; see docs/RELEASING.md.

Contributing

Bug fixes and docs fixes are welcome as pull requests. For anything larger, open an issue first so we can agree on direction before you write code. CONTRIBUTING.md has the details, including what we are unlikely to merge and why.

Community

License

Apache-2.0. See LICENSE.

GitHub Stars & Activity

1,551Stars
427Forks
201Open issues
GoLanguage

GitHub Popularity

GitHub stars1,551
Forks427
Open issues201
Primary languageGo
LicenseApache-2.0
Stars gained today115
Created2023-08-10
Last pushed2026-09-16

Trending History

Daily boardrank #58 · ▲ 115 stars

Related GitHub Projects

1

ollama / ollama

Go★ 181,120⑂ 17,905▲ 108 stars
2

JuliusBrussee / caveman

Go★ 105,930⑂ 6,127▲ 233 stars
3

alibaba / open-code-review

Go★ 30,960⑂ 2,213▲ 3,215 stars
4

netbirdio / netbird

Go★ 29,283⑂ 1,680▲ 57 stars
5

Tencent / WeKnora

Go★ 25,022⑂ 3,456▲ 1,201 stars
6

TencentCloud / CubeSandbox

Go★ 12,551⑂ 1,123▲ 50 stars
7

tailscale / tailcat

Go★ 7,338⑂ 299▲ 144 stars
8

versity / versitygw

Go★ 2,876⑂ 302▲ 66 stars

More Trending Repositories