A run is one execution of a workflow definition. It tracks the input values, a snapshot of the workflow spec, and the current execution state from the moment it enters the queue through to a terminal outcome. Workers claim individual jobs spawned by a run's steps — not the run itself. The action log records what each step did.

The model

Each run carries:

  • A status — one of queued, running, suspended, completed, or failed.
  • A spec snapshot — the workflow spec captured at run creation. Edits to the definition after that point do not affect in-flight runs.
  • Inputs — the key-value map supplied at start time.
  • An attempt counter — 1-based, increments on each retry.
  • A parent run ID — set when this run was spawned by a fan-out step inside another run.
  • An external ID — a caller-supplied idempotency or correlation key, filterable in the list API.
  • A cancel_requested flag — set by a cancel call; workers observe it on their next heartbeat and stop cooperatively.

The server owns run progression. Workers claim jobs — the claimable units created by worker-action steps — not the run itself.

Starting a run

curl -X POST "$MOBIUS_API_BASE/v1/projects/acme/runs" \
  -H "Authorization: Bearer $MOBIUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "definition_id": "wf_01abc",
    "inputs": { "doc_id": "doc_999" },
    "external_id": "order-42"
  }'

The endpoint returns 202 Accepted with the run record at queued status. The engine schedules the first step; workers polling the queue pick up the resulting job. Pass spec instead of definition_id to start an ephemeral run — no workflow definition is created, and the run carries an empty definition_id.

Lifecycle

StateEntered whenLeft when
queuedRun is created or resumedWorker claims it → running; or max attempts exhausted → failed
runningA worker claims the runAll steps complete → completed; unrecoverable error → failed; step awaits external input → suspended
suspendedA step waits on a signal, interaction, or sleepSignal arrives or interaction is responded to → queued
completedAll steps succeedTerminal
failedRun exceeds retries or hits a fatal errorTerminal; re-enqueue via POST /v1/projects/{project}/runs/retries

Where you see it

  • DashboardProjects → <project> → Runs lists all runs, filterable by status (All, Running, Queued, Suspended, Failed, Completed). Active runs appear under Active now; terminal runs appear under Recent.
  • API — the Runs tag group covers starting, listing, inspecting, cancelling, retrying, and streaming run events.
  • Events — subscribe to GET /v1/projects/{project}/runs/{id}/events (SSE) for a per-run stream of run_updated, job_updated, and action_appended frames; use GET /v1/projects/{project}/runs/events for the project-wide stream.

See also

  • Workflows — the definitions that runs execute.
  • Jobs — the claimable work units that worker-action steps create.
  • Action log — the append-only record of step outcomes within a run.
  • Triggers — the rules that start runs automatically.