DomainRuntimedocs
Environments
PlannedWhat works todayReviewed 2026-09-22

Sandboxes

A machine that runs the whole stack for one environment, for tests, agents and previews.

Planned. Sandboxes run on our infrastructure today for internal tests (measured on 2026-09-19: ready in 22–33 s, about USD 0.10 per sandbox-hour). Self-service access comes with the platform SDK. Today's SDK exposes them as up, pull, run, status and down; the shape below is the one we are converging on.

A sandbox runs the whole stack for one environment on its own isolated machine: the runtime, your action code and dataset processing, talking over localhost. It is bound to an existing development environment and uses that environment's data; its files go to the same storage as every environment.

Use one to give an agent a place to run your domain, to preview a branch, or to run end-to-end tests against a dedicated test environment.

From code

import { init } from "@domainruntime/platform";
import domain from "../src/domain";

const platform = init({ serviceKey: process.env.DOMAIN_SERVICE_KEY! });

const sandbox = await platform.sandboxes.create({ env: "dev-orders-e2e-4k2m9x1p" });
try {
  await sandbox.pushDomain(domain);
  const { orderId } = await sandbox.actions.run("orders.place", { orderId: crypto.randomUUID(), total: 10 });
  const { data } = await sandbox.query({ orders_order: { $: { where: { id: orderId } } } });
  expect(data.orders_order).toHaveLength(1);
} finally {
  await sandbox.destroy();
}

From the CLI

druntime sandbox up
druntime sandbox pull dev-orders-e2e-4k2m9x1p --domain=src/domain.ts
druntime sandbox run orders.place --input='{"orderId":"…","total":10}'
druntime sandbox down

Limits

Concurrent sandboxes per organizationset by your plan
Maximum lifetime7.9 hours
Networkoutbound internet is available from your action code
Workflowsnot available inside a sandbox yet

On this page