Skip to content

Self-host on E2B sandboxes

E2B runs each Session inside a hosted Firecracker microVM. It is the simplest hosted backend for the Node self-host: one API key, no infrastructure to run, and provider memory snapshots for suspend/resume.

Terminal window
E2B_API_KEY= # required
SANDBOX_IMAGE= # E2B template reference used as the Environment image

For E2B-compatible endpoints, the connection details stay in the same environment map:

Terminal window
E2B_API_URL= # or E2B_SANDBOX_URL / E2B_DOMAIN, depending on deployment
OMA_E2B_TEMPLATE= # explicit template override

On the standalone Node server, select the adapter directly:

Terminal window
SANDBOX_PROVIDER=e2b
E2B_API_KEY=...
SANDBOX_IMAGE=...

To embed the driver in the Runtime Host composition instead, use createE2BManagedRuntime / createE2BManagedRuntimeDriver from @open-managed-agents/managed-runtime-e2b:

const driver = createE2BManagedRuntimeDriver({
leaseTtlMs: 90_000,
environment: {
E2B_API_KEY: process.env.E2B_API_KEY!,
SANDBOX_IMAGE: process.env.SANDBOX_IMAGE!,
},
});

The factory also accepts a per-scope environment function, an explicit outputStore (null disables the S3 default), credentialEgress, sessionInputs, runtimeEnvironment, context, and a test seam provider.

Harness lanesama_worker, openma_supervised
suspendResumesupported (provider memory snapshot)
Workspaceretained_runtime + checkpoint_restore, durable
Outputsfinal_collect, durable (S3 store when configured)
Process checkpointsnone
Credential egressunsupported/snapshot by default