Start a workflow run
Starts a deterministic orchestration of multiple agents from a script — by path or inline source — with arguments. The script runs in the host’s confined runtime: no filesystem, no network, no module loading; only the agent API the host provides. Script validation failures return 422 NRY-0010 before anything executes. Progress streams as workflow-progress events.
A hosted home runs every session inside a container. A run there that names no environment opens its session as createSession does: with a container of its own made at its first turn, or, naming a repository in clone, made with that clone before the run starts.
Authorizations
Enforced on every transport, with no exempt operation. A person's request — over the default local unix socket exactly as over a TCP listener — must carry a JWT issued by the configured identity provider, which the host verifies itself against that issuer's key set: signature, issuer, expiry, and the person and organisation it names. Requests without a valid one receive 401 NRY-0011. The socket's file permissions are transport and are not an authorisation.
Body
- Option 1
- Option 2
Request to start a workflow run from a script — exactly one of scriptPath or source.
Absolute path of the workflow script.
4096Inline workflow script source.
Arguments passed to the script.
64Run the session this run opens, and with it every step and delegate, inside this environment, which must already exist (createEnvironment). Absent means the host's own machine on a person's own home, and a container of the session's own on a hosted home (createSession).
1 - 64^[A-Za-z0-9][A-Za-z0-9._-]*$A repository to clone into the run session's own container before the run starts, exactly as createSession's clone: on a hosted home, without environment, and the session's repository.
200^[A-Za-z0-9][A-Za-z0-9._-]*/[A-Za-z0-9][A-Za-z0-9._-]*$Run once in place of the clone's own .narya/setup.sh, as createSession's setupScript. Only with clone (422 otherwise).
1 - 65536Response
Run accepted and starting; watch events or poll the run.
A deterministic orchestration run with per-step progress.
pending, running, completed, failed, stopped Reserved response field. The current host snapshots a local path into the run's stored source and does not retain or return the path, so this field is absent for both source forms.
4096The session the run's agents work in, so their transcripts can be read back after the run and after a restart. Absent until the run has started one, and cleared if that session is later purged.
Present when the run itself failed outside any step.

