Experimental. An E2B sandbox backend for Vercel's
Eve agent framework — the E2B counterpart to
Eve's built-in vercel() / docker() / microsandbox() / justbash()
backends. It implements the public SandboxBackend interface from eve/sandbox,
so no changes to Eve itself are required.
npm i @e2b/eve-sandbox e2b
# eve and ai are peer deps provided by your Eve projectSet E2B_API_KEY (or pass apiKey in options).
// agent/sandbox.ts
import { defineSandbox } from "eve/sandbox";
import { e2b } from "@e2b/eve-sandbox";
export default defineSandbox({
backend: () => e2b({ template: "base" }),
});For one-time setup (installing packages, seeding files), add Eve's optional
bootstrap hook or agent/sandbox/workspace/ seed files — this package bakes
them into a reusable snapshot at build time.
pnpm test # unit tests (no credentials needed)
pnpm type-checkThe unit suite covers the network-policy mapping, snapshot naming/dedup, the
buildSandboxSession replica, and the background-process adapter. A live
integration test in test/ boots a real E2B sandbox and auto-skips unless
E2B_API_KEY is set:
E2B_API_KEY=... pnpm test # also runs the live sandbox round-trip