Learning resourcesReviewed · Mistral AI

Mistral Workflows Queries Guide

Mistral’s Queries guide teaches developers to check a running workflow’s state, but queries must return quickly and cannot change that state. It covers Python query handlers, typed input validation, SDK and HTTP calls, and the differences between queries, signals and updates.

Researched 15 Nov 2026

In short.

Mistral’s Queries guide teaches developers to check a running workflow’s state, but queries must return quickly and cannot change that state. It shows a progress-reporting handler, parameter validation with optional Pydantic models, and calls through the Python SDK or HTTP API. Queries cannot execute activities. The page is useful for understanding this interaction method, but it omits installation and deployment instructions, SDK versions, pricing and operational guarantees. Its examples were not executed.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage includes the complete supplied Queries documentation page at [https://docs.mistral.ai/studio/workflows/interacting-with-workflows/queries.md], including all examples and the comparison table. Linked pages and broader SDK or service documentation are excluded. No licence, pricing, release or maintenance notice appears in the supplied page. No code or API request was executed; operational behavior, performance and compatibility were not assessed.

The overview

Identity

Queries is a Mistral documentation page about reading the current state of a running workflow from an external system. The source is [https://docs.mistral.ai/studio/workflows/interacting-with-workflows/queries.md]. It is a feature guide with examples, rather than a standalone application or complete workflow project.

Assessment

The guide provides enough detail to understand the query model and the shape of a basic implementation. Its strongest practical material connects a named Python handler to an external call and explains validation failures. It does not establish how to install, deploy or operate the surrounding workflow service.

Users

The guide suits developers integrating an external application with a Mistral workflow. A likely use is a dashboard checking progress or completion; that use follows from the status example, although no dashboard integration is demonstrated. Beginners will benefit from familiarity with Python classes, decorators, asynchronous functions and authenticated HTTP requests.

Capabilities

Queries synchronously return information from a running workflow without modifying its state. Handlers can accept parameters, and the SDK validates incoming types and rejects fields absent from the handler signature. The page documents HTTP 422 responses with descriptive messages for validation failures and shows Pydantic models for structured input.

Using it

Requirements

The Python examples use mistralai.workflows to define the workflow and handler, and mistralai.client.Mistral to send a query. Structured-input examples also use Pydantic. An external caller needs an API key, a running workflow execution, its execution ID and the registered query name. Package versions, supported Python versions and account requirements are not specified.

Mechanism

The workflow.query decorator registers a method under a query name such as get_status. An external caller identifies the execution and handler, then receives the handler’s return value synchronously. The example reads progress and completed fields maintained by the workflow. Queries may be called during execution, must return quickly and cannot execute activities.

Setup

The demonstrated sequence is to initialize workflow state, define a short query handler, and run the workflow before querying it externally. The SDK call is client.workflows.executions.query_workflow_execution with execution_id and name arguments. The HTTP equivalent sends a POST request with bearer authentication and a JSON query name to [https://api.mistral.ai/v1/workflows/executions/{execution_id}/queries].

Installation, execution creation and deployment are not shown. The first Python example uses asyncio.sleep without importing asyncio; that import is needed if adapting the snippet as standalone code.

Example

ProcessingWorkflow initializes progress to 0.0 and completed to false. Its entrypoint advances progress in ten steps, with a one-second asynchronous sleep after each step, then marks completion. The get_status handler returns both fields. The illustrated response contains query_name set to get_status and a result showing progress of 60.0 with completed false; this is documentation output, not an observed execution.

A second example accepts a StatusRequest model whose include_details field defaults to false. When requested, it adds self.completed_steps to the result, but the page does not show that field being initialized.

Assessment & evidence

Limitations

Queries are unsuitable for long-running work, state changes or activity execution. The page gives no numerical response-time limit, timeout behavior, polling limits or consistency guarantees for values read while the workflow progresses.

The sending examples omit parameterized requests, so the wire format for passing StatusRequest is not demonstrated. The page also leaves behavior after execution completion unspecified. The examples were not run, and runtime correctness and SDK compatibility remain unassessed.

Reasoning

Queries fit a caller that needs an immediate answer about state the workflow already holds. The progress example illustrates why: the handler returns two fields while work continues. A request that starts substantial work or changes state falls outside the documented query model. The synchronous design alone does not establish any particular latency.

Alternatives

The page compares two other interaction methods within the same workflow system. Signals are asynchronous, can modify state, return no value and cannot execute activities. Updates are synchronous, can modify state, return a value and can execute activities. These distinctions help choose an interaction method; implementation details for signals, updates and competing platforms are outside the supplied page.

Evidence

The evidence consists of the complete Queries page, including its definitions, two handler examples, SDK and curl calls, illustrative response and comparison table. These support descriptions of documented behavior, but provide no measured latency, load results or independent execution evidence.

The captured source revision is sha256:1d0d2d73e3238fd59e6d0c51cbbbf4ad4e2cc4a35e21fe29a05a0b4bf2efd69a.

Access & freshness

Costs

The page gives no pricing, free allowance, query billing rules or workflow hosting charges. The cost of implementing and operating these examples is unknown. Neither the short example nor its use of an API key establishes a free usage tier.

Rights

The supplied page contains no licence or reuse terms for its prose or code examples. Permission to redistribute or adapt those materials is therefore unknown from this evidence. SDK licensing and service terms are also not provided.

Freshness

The page was captured on 15 November 2026 at 08:48:13.559 UTC. It contains no publication date, last-updated date or SDK version. The capture time identifies the available snapshot; compatibility with a particular release and changes after capture are unknown.

Actions

For a progress-reading integration, define a short handler that returns initialized workflow fields, obtain a running execution ID and call the handler by its registered name. Add the missing asyncio import when adapting the first example and initialize completed_steps before using the detailed-status example.

Before relying on the integration, establish the applicable SDK version, setup instructions, parameter-passing format, service limits and pricing. Verify successful responses and invalid-input behavior in your own environment. Use the page’s signal and update comparison when the caller needs to change state.

Evidence for this report

selected-page.txtselected · checked 2026-11-15