Workflows

Execute Workflow

Execute a workflow with the provided input data. Workflows can run in streaming or batch mode.

Execution Modes:

  • Streaming (stream=true): Real-time step-by-step execution updates via SSE
  • Non-Streaming (stream=false): Complete workflow execution with final result

Workflow Execution Process:

  1. Input validation against workflow schema
  2. Sequential or parallel step execution based on workflow design
  3. Data flow between steps with transformation
  4. Error handling and automatic retries where configured
  5. Final result compilation and response

Session Management: Workflows support session continuity for stateful execution across multiple runs.

post/workflows/{workflow_id}/runs

Request

Path parameters

workflow_idstring required

Request body application/x-www-form-urlencoded

messagestring required

The input message or prompt to send to the workflow

streamboolean

Enable streaming responses via Server-Sent Events (SSE)

backgroundboolean

Run workflow in background (survives client disconnect). Requires database. Use /resume to reconnect.

session_idstring nullable

Session ID for conversation continuity. If not provided, a new session is created

user_idstring nullable

User identifier for tracking and personalization

versioninteger nullable

Workflow version to use for this run

factory_inputstring nullable

JSON object with factory-specific parameters for dynamic workflow construction

Response

Workflow executed successfully

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.