> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zap.wzrd.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# E2B

> Firecracker microVM sandboxes with pause/resume snapshots and public HTTPS ports.

<img src="https://mintcdn.com/gratitude5dee-zap-56/Y4G9H4edehsua_Ul/images/logos/e2b.png?fit=max&auto=format&n=Y4G9H4edehsua_Ul&q=85&s=6d608c0fc4b0e2beaf951eabc8df7cac" alt="E2B" style={{ height: "32px", width: "auto" }} noZoom width="128" height="128" data-path="images/logos/e2b.png" />

First-party adapter over Firecracker microVMs (`sandbox.e2b` plugin).

* Isolation: `microvm` (Firecracker).
* Lifecycle: `Sandbox.create` → run → `pause()` (stop) → `Sandbox.connect(id)` (resume). `pause` also backs `snapshot()`: it persists the filesystem and returns a resumable sandbox id.
* Ports: `getHost(port)` returns a public HTTPS host; no private ports.
* Pinned SDK: `e2b@2.6.4`.

```ts theme={null}
import { createE2BProvider } from "@wzrdtech/zap-sandbox/adapters/e2b";

const provider = createE2BProvider({
  apiKey, // E2B_API_KEY — injected by the composition, never process.env
  createSandbox: wireE2BSdk(apiKey),
  connectSandbox: (id) => connectE2BSdk(apiKey, id),
});
```

`zap doctor` reports `first-party`; `ok: false` without an API key. Live conformance tests are opt-in (`RUN_HOSTED_SANDBOX_TESTS=1` + `E2B_API_KEY`).
