FabricFabricHarness
Reference

Sandboxes matrix

Every supported sandbox backend at a glance — what it gives you, the example, and the one-liner to enable it.

A sandbox is where shell commands and tool calls execute. It's chosen at init({ sandbox }) and is independent of which SDK entrypoint you import from and which runtime you select.

SandboxWhat it gives youEnable withExample
virtual (default)In-memory FS + bash subset (grep, glob, read, cat, mkdir, rm, echo) via just-bash. No host shell access.injected by default; init({ sandbox: 'virtual' }) to be explicitexamples/hello-world/
localHost filesystem and host shell at the session's working directory.init({ sandbox: 'local' })examples/with-local-shell/
dockerPer-session Docker container; reads/writes scoped to the container.init({ sandbox: { backend: 'docker', image: 'node:22' } })examples/with-docker/
cloudflareCloudflare Sandbox container binding for Workers. Edge-native.init({ sandbox: await getCloudflareSandbox(env.SANDBOX, sessionId) }) (from @fabric-harness/cloudflare)examples/with-cloudflare-sandbox/
Temporal-driven localRuns through Temporal workflows for replay-determinism, restartability, approvals.import { agent } from '@fabric-harness/sdk/strict' + init({ runtime: 'temporal', sandbox: 'local', compaction: { enabled: false } })examples/with-temporal/
Azure Foundry HostedAzure-managed agent runtime; Key Vault secrets, Foundry observability.AzureOpenAIModelProvider + fabric-harness build --target foundry-hosted-agentexamples/with-azure/
DaytonaDaytona-managed remote dev sandbox. Per-task ephemeral box.init({ sandbox: daytonaSandbox(remote, { cleanup: true }) }) (from @fabric-harness/connectors)examples/with-daytona/
E2BE2B remote sandbox; native pause/resume.init({ sandbox: e2bSandbox(remote, { cleanup: true }) }) (from @fabric-harness/connectors)recipe connectors/sandbox--e2b.md
ModalModal serverless sandbox; per-request GPU.init({ sandbox: modalSandbox(remote, { cleanup: true }) }) (from @fabric-harness/connectors)examples/with-modal/
Vercel SandboxVercel's ephemeral container compute (Amazon Linux 2023, Node 24/22, python3.13). Native pause/extend.init({ sandbox: vercelSandbox(remote, { cleanup: true }) }) (from @fabric-harness/connectors/vercel)recipe connectors/sandbox--vercel.md
Kubernetes / AKSKubernetes pod via kubernetesSandbox(pod, …) (or aksSandbox from @fabric-harness/azure).init({ sandbox: kubernetesSandbox(pod, { cleanup: true }) }) (from @fabric-harness/connectors/k8s)examples/with-kubernetes/
Databricks SQLSQL Warehouse exec-only sandbox.init({ sandbox: databricksSqlSandbox(client) }) (from @fabric-harness/databricks/sql-sandbox)n/a
emptyNo filesystem, no shell — pure model + tool-call work.init({ sandbox: 'empty' })n/a

Maturity. virtual, local, docker, empty are stable. daytona, e2b, modal, cloudflare, kubernetes/aks, databricks-sql are experimental — covered by tests but mock-only in CI; live integrations rotate. See docs/capability-matrix.md for the source of truth.

Cross-process refs. Remote backends (E2B, Daytona, Modal, Kubernetes) can be re-attached from another process with session.sandboxRef({ portable: true }) + attachSandbox(serialized) once registerStandardSandboxRefDecoders({...}) is called in the receiving process. See @fabric-harness/connectors/sandbox-refs.

Picking a sandbox

  • One-shot webhook / edge workervirtual (cheap, fast, no host) or cloudflare (Workers).
  • CI job, dev boxlocal.
  • Coding agent / untrusted shell workdocker, daytona, or modal.
  • Long-running, restartable — Temporal-driven local (use /strict).
  • Compliance / Azure tenant — Azure Foundry Hosted Agent.

Capability axes

Every sandbox declares a SandboxCapabilities shape so agents can adapt:

sandbox.capabilities // { exec, network, filesystem, snapshot, ... }

Use this when an agent legitimately needs to know whether shell exec is available before issuing a command.

See also