Deployment
E2B
Ephemeral sandbox execution for untrusted code.
Use E2B as an ephemeral SandboxEnv for code execution while the Fabric Harness runtime runs in your Node deployment.
Install
npm install @fabric-harness/connectors @e2b/code-interpreterConnect a sandbox
import { Sandbox } from '@e2b/code-interpreter';
import { e2bSandbox } from '@fabric-harness/connectors';
import { init } from '@fabric-harness/sdk';
const remote = await Sandbox.create();
const fabric = await init({
sandbox: e2bSandbox(remote, { cleanup: true }),
});
const session = await fabric.session();
const result = await session.prompt('Run the supplied Python analysis and summarize the output.');The adapter maps E2B commands and file operations to the common Fabric sandbox interface. Keep cleanup: true for per-session environments.
The supported range is @e2b/code-interpreter >=2.6.1 <3. Native command callbacks, timeout, pause/resume, binary files, and the provider sandboxId are mapped to the Fabric contract.
registerStandardSandboxRefDecoders({
e2b: { connect: ({ sandboxId }) => Sandbox.connect(sandboxId) },
});Use assertSandboxCertification() to produce the credentialed, secret-free CI evidence file.
Environment variables
E2B_API_KEY— E2B API key (read lazily at runtime)