Skip to main content

Prerequisites

  • A running ZWRM control plane (zwrmd)
  • The zwrm CLI installed and configured
  • At least one built template (built-in templates are registered on startup)

Create an ephemeral sandbox

Create a sandbox from the python template with a 10-minute timeout:

Execute a command

Run Python code inside the sandbox:
Commands run inside the VM via the in-VM agent daemon. You can set a custom timeout and working directory:

Upload and download files

Upload a local file to the sandbox:
Download a file from the sandbox:

Extend the timeout

If you need more time, extend the sandbox’s TTL:

Check status

View the sandbox details:

Create a persistent sandbox

Persistent sandboxes auto-suspend after inactivity and wake on demand:
When the sandbox goes idle, it’s automatically suspended. Wake it with:
Or simply execute a command — any API call to a suspended sandbox triggers an automatic wake:

Destroy a sandbox

Add --force to skip the confirmation prompt.

Using the REST API

All CLI commands map to REST API endpoints. Here’s the equivalent of the above using curl:

Next steps

Ephemeral sandboxes

Deep dive into disposable sandbox environments.

Persistent sandboxes

Learn about auto-suspend, snapshots, and wake-on-demand.

Templates

Create custom templates for your sandboxes.