Inngest Sandboxes | Open beta

A microVM your retries can't lose.

Sandboxes are isolated Linux microVMs. Inngest runs every sandbox call as a durable step, so when your code crashes after creating one, the retry picks up the same VM, the same files, and the same trace. Nothing to poll, retry, or clean up by hand.

durability-demo · COMPLETED · 6.0 s1 sandbox created · 1 destroyed · 2 attempts
  • ●create-sandbox280 ms
  • ●wait-running1.08 s
  • ●write-marker133 ms
  • ●flaky-after-createattempt 13 ms
  • ●flaky-after-createattempt 21 ms
  • ●run-hello213 ms
  • ●read-marker136 ms
  • ●destroy-sandbox222 ms

Try it in your browser

Choose a command and watch a recorded run unfold. Steps, sample output and sandbox states arrive over time. Replay it as often as you like.

  1. Create a sandboxCreate a microVM, run a command, destroy it. Four steps, one trace.
  2. DurabilityCrash mid-run. Retry. Same sandbox, no lost work.
  3. CI pipelineA CI pipeline in TypeScript. One machine per job, jobs that pass never rerun.

The whole integration

One middleware adds step.sandbox to your functions. Create, run, and destroy are steps like any other. Learn more about running it against real microVMs.

npm i inngest@latest

import { Inngest } from "inngest";
import { sandboxMiddleware } from "inngest/experimental";

const inngest = new Inngest({ id: "my-app", middleware: [sandboxMiddleware()] });

inngest.createFunction({ id: "run-tests", triggers: [{ event: "repo/pushed" }] }, async ({ step }) => {
  const sandbox = await step.sandbox.create("create", { name: "tests", vcpu: 2, memoryMb: 2048 });
  const result = await sandbox.commands.run("test", "npm test", { timeout: "5m" });
  await sandbox.destroy("destroy");
  return result;
});