← Back to Registry
Modal
Beta Sandbox Mounting
Run sandboxes on Modal's serverless cloud infrastructure.
Mount the sandbox
Mount a Modal 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 { modal } from "sandbox-agent/modal";
// Start a Modal-backed sandbox and mount it into the VM
const sandbox = await SandboxAgent.start({ sandbox: modal() });
const vm = agentOS({
mounts: [{ path: "/home/agentos/sandbox", plugin: createSandboxFs({ client: sandbox }) }],
bindings: [createSandboxBindings({ client: sandbox })],
});
export const registry = setup({ use: { vm } });