Execute a workflow action
Executes a single workflow action step and streams the result as Server-Sent Events. Same idempotency and resume semantics as POST /agent/v1/runs: a retry with the same Idempotency-Key and body resumes the existing stream.
Requires: workflows:invoke
Authorizations
A Modus personal access token (modus_<orgUuid>_<prefix>_<secret>) or an OAuth 2.1 access token, sent as Authorization: Bearer <token>.
Headers
Client-generated idempotency key (UUID recommended). Retry with same key + same body resumes the existing SSE stream. Same key + different body returns a 409 error event.
Body
Client-generated session identifier.
Workflow action descriptor: toolId, toolName, aiDescription, runtimeScope, and any action-specific parameters.
Organization the run belongs to. Omit for PAT/SDK callers — falls back to the authenticated principal's org.
File thread ID for document-scoped execution.
Outputs from earlier steps in a multi-step workflow, forwarded to the action runtime.
IANA time zone name for the executing user (e.g. "America/New_York").
Optional client-supplied run ID. Idempotency-Key header takes precedence.
Workflow id for usage attribution.
UI surface that triggered this action.
agent, api, other Response
SSE stream of workflow action run events. Same frame format as POST /agent/runs. Ends with a terminal RunEvent (done/error/cancelled).
W3C Server-Sent Events stream. Each frame: id: \n data: \n\n
RunEvent shapes are identical to POST /agent/runs.