Mistral RunWorkflow

Mistral RunWorkflow

Certified

Run a Mistral Workflow execution

Starts a Mistral Workflow execution via the REST API and optionally waits for it to reach a terminal state.

Note: Mistral Workflows is currently in public preview. Register workflows via the Mistral Python SDK or Studio before using this task.

When wait is true (default), the task polls every pollInterval until the execution completes, fails, or waitTimeout is reached. For long-running workflows (over 15 minutes), set wait: false and use the WorkflowEvents trigger to react to completion.

Terminal success statuses: COMPLETED, CANCELED, CONTINUED_AS_NEW. Terminal failure statuses that make the task throw an exception: FAILED, TIMED_OUT, TERMINATED.

Killing the task stops the poll loop and requests cancellation of the Mistral execution, so a killed Kestra task does not leave it running. A worker shutdown only stops the poll loop: it is not the user cancelling, so the Mistral execution is left running. Both apply only when wait is true, since a wait: false execution is deliberately detached.

yaml
type: io.kestra.plugin.mistral.RunWorkflow

Run a Mistral Workflow and wait for completion

yaml
id: mistral_run_workflow
namespace: company.team

tasks:
  - id: run_workflow
    type: io.kestra.plugin.mistral.RunWorkflow
    apiKey: "{{ secret('MISTRAL_API_KEY') }}"
    workflowIdentifier: "my-summarization-workflow"
    input:
      text: "Kestra is an open-source orchestration platform."
      language: "en"
    wait: true
    waitTimeout: PT15M
    pollInterval: PT5S

Fire-and-forget a Mistral Workflow execution

yaml
id: mistral_fire_and_forget
namespace: company.team

tasks:
  - id: start_workflow
    type: io.kestra.plugin.mistral.RunWorkflow
    apiKey: "{{ secret('MISTRAL_API_KEY') }}"
    workflowIdentifier: "my-long-running-workflow"
    input:
      dataset: "kestra://namespace/files/data.csv"
    wait: false
Properties

API key

Bearer token for the Mistral API; keep in a secret variable.

Workflow identifier

The name or ID of the registered Mistral workflow to execute.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
Defaulthttps://api.mistral.ai/v1

Base URL

API base URL; defaults to https://api.mistral.ai/v1.

Deployment name

Optional deployment name for routing to a specific workflow version.

Execution ID

Optional custom execution ID; a UUID is generated by the API when omitted.

Input

Key-value input map passed to the workflow on execution.

DefaultPT5S

Poll interval

How often to poll the execution status when wait is true. Defaults to PT5S.

Defaulttrue

Wait for completion

When true, the task polls until the execution reaches a terminal state. Defaults to true.

DefaultPT15M

Wait timeout

Maximum duration to wait for a terminal state before throwing a TimeoutException. Defaults to PT15M.

End time

ISO-8601 timestamp when the execution ended.

Execution ID

The ID of the Mistral workflow execution.

Result

JSON-serialized result payload returned by the workflow on successful completion.

Start time

ISO-8601 timestamp when the execution started.

Status

Terminal status of the execution (e.g. COMPLETED, FAILED, CANCELED).

Total duration (ms)

Wall-clock duration in milliseconds from start to end.