← Back to Registry
E2B
Beta Sandbox Mounting
Run sandboxes on E2B's cloud infrastructure for secure, ephemeral environments.
Mount the sandbox
Mount a E2B sandbox into the VM with @rivet-dev/agentos-sandbox.
import { agentOS, setup } from "@rivet-dev/agentos";
import { createSandboxFs, createSandboxBindings } from "@rivet-dev/agentos-sandbox";
import { SandboxAgent } from "sandbox-agent";
import { e2b } from "sandbox-agent/e2b";
// Start a E2B-backed sandbox and mount it into the VM
const sandbox = await SandboxAgent.start({ sandbox: e2b() });
const vm = agentOS({
mounts: [{ path: "/home/agentos/sandbox", plugin: createSandboxFs({ client: sandbox }) }],
bindings: [createSandboxBindings({ client: sandbox })],
});
export const registry = setup({ use: { vm } });