Skip to main content
Run a program and an argument list, or one shell string. The CLI always sends argv, so a command that uses ; goes through a shell. See Run a script.

Run a command

CLI timeout is in seconds (--timeout 300). The REST timeout field is in milliseconds (300000). The SDKs take seconds and convert for you.

Install a package

Egress is deny-by-default, so pip install needs a network policy. This example uses allow_all for a short demo; prefer an allowlist for PyPI.

Run a script

Set environment variables

Set env_vars when you create the runtime so every command and code run can read them, or pass variables on one command:

Stream the output

Pass on_stdout or on_stderr to read output while the command runs. The full walkthrough is on Stream command output.

Run in the background

Set background to return as soon as the process is running, then wait or stop it with the pid. Attach, list, and stop are on Run in the background.

Parameters

Response

Endpoint

POST /v1/agents/runtime/{runtime_id}/commands/run Add ?stream=true to stream output. Background attach and stop paths are on Run in the background.