Events

March 30, 2026 ยท View on GitHub

Overview

Available Operations

get_stream_events

Get Stream Events

Example Usage

from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.events.get_stream_events(scope="*", activity_name="*", activity_id="*", workflow_name="*", workflow_exec_id="*", root_workflow_exec_id="*", parent_workflow_exec_id="*", stream="*", start_seq=0)

    with res as event_stream:
        for event in event_stream:
            # handle event
            print(event, flush=True)

Parameters

ParameterTypeRequiredDescription
scopeOptional[models.Scope]:heavy_minus_sign:N/A
activity_nameOptional[str]:heavy_minus_sign:N/A
activity_idOptional[str]:heavy_minus_sign:N/A
workflow_nameOptional[str]:heavy_minus_sign:N/A
workflow_exec_idOptional[str]:heavy_minus_sign:N/A
root_workflow_exec_idOptional[str]:heavy_minus_sign:N/A
parent_workflow_exec_idOptional[str]:heavy_minus_sign:N/A
streamOptional[str]:heavy_minus_sign:N/A
start_seqOptional[int]:heavy_minus_sign:N/A
metadata_filtersDict[str, Any]:heavy_minus_sign:N/A
workflow_event_typesList[models.WorkflowEventType]:heavy_minus_sign:N/A
last_event_idOptionalNullable[str]:heavy_minus_sign:N/A
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

Union[eventstreaming.EventStream[models.GetStreamEventsV1WorkflowsEventsStreamGetResponseBody], eventstreaming.EventStreamAsync[models.GetStreamEventsV1WorkflowsEventsStreamGetResponseBody]]

Errors

Error TypeStatus CodeContent Type
errors.HTTPValidationError422application/json
errors.SDKError4XX, 5XX*/*

get_workflow_events

Get Workflow Events

Example Usage

from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.events.get_workflow_events(limit=100)

    # Handle response
    print(res)

Parameters

ParameterTypeRequiredDescription
root_workflow_exec_idOptionalNullable[str]:heavy_minus_sign:Execution ID of the root workflow that initiated this execution chain.
workflow_exec_idOptionalNullable[str]:heavy_minus_sign:Execution ID of the workflow that emitted this event.
workflow_run_idOptionalNullable[str]:heavy_minus_sign:Run ID of the workflow that emitted this event.
limitOptional[int]:heavy_minus_sign:Maximum number of events to return.
cursorOptionalNullable[str]:heavy_minus_sign:Cursor for pagination.
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

models.ListWorkflowEventResponse

Errors

Error TypeStatus CodeContent Type
errors.HTTPValidationError422application/json
errors.SDKError4XX, 5XX*/*