Capabilities

This page is the reference behind the Sandboxes overview: what people build with sandboxes, what one actually is, and the capabilities every sandbox exposes.

What Sandboxes are for

Agent build loops

Generate code, edit files, install dependencies, run tests, and stream logs back to the agent.

Preview servers

Run a web server in the sandbox and expose only the needed port as an HTTPS preview URL.

Safe execution

Isolate untrusted commands from your backend while keeping filesystem state scoped to the sandbox.

Reproducible state

Snapshot working state, resume later, or fork from a known point for parallel agent work.

What a Sandbox is, concretely

  • Isolated compute for code generation, builds, tests, and dev servers.
  • Named, versioned CPU, memory, and disk contracts plus per-sandbox timeout and environment parameters.
  • /workspace is the editable filesystem root.
  • Boots from a versioned template, usually miosa-sandbox.
  • Persistent by default, so timeout_sec stops compute and preserves state instead of deleting the workspace.
  • Network-isolated by default.
  • Preview URLs open only the specific ports you expose.
  • Destroy is permanent and removes the saved state.

Core capabilities

CapabilityWhat it gives you
exec.runBlocking command execution with stdout, stderr, exit code, and duration
exec.streamReal-time stdout/stderr events for long builds or installs
files.write/read/list/statDirect filesystem access under /workspace and other allowed paths
previews.createPublic HTTPS URL for a running process on a specific sandbox port
snapshotDurable checkpoint for resume, fork, or rollback
pause / resumeStop compute without discarding saved state

See it work

Was this page helpful?