Framework for building durable workflows with orchestrated activities, used for background jobs, multi-step pipelines, scheduled tasks, LLM agents, or any process requiring fault tolerance, retries, and long-running execution. This skill provides comprehensive documentation and guidance for working with the Mistral Workflows framework.
47%
Does it follow best practices?
Impact
100%
2.94x2 of 3 eval scenarios. Add 1 more for a full score.
Medium
Suggest reviewing before use
Fix and improve this skill with Tessl
tessl review fix ./template/.agents/skills/workflows/SKILL.mdThis skill provides comprehensive documentation and guidance for the Mistral Workflows framework, which is designed for building durable, fault-tolerant workflows with orchestrated activities.
Mistral Workflows is a durable-execution orchestration platform that accelerates the development and reliable execution of complex, AI-driven workflows. It combines a user-friendly API with a rich Python framework (mistralai.workflows) optimized for Mistral's AI services, providing fault-tolerant execution, automatic retries, and durable state that survives crashes — from simple sequences to long-running, stateful processes (seconds to years).
This skill targets the mistralai-workflows SDK v3.4.0 and higher:
uv add "mistralai-workflows>=3.4.0,<4.0.0"Canonical import style used throughout this skill:
import mistralai.workflows as workflows
@workflows.workflow.define(name="my_workflow")
class MyWorkflow:
@workflows.workflow.entrypoint
async def run(self, data: str) -> str:
...Focused snippets may use from mistralai.workflows import workflow, activity, ... instead.
Always use the SDK; never import temporalio directly. The SDK re-exports everything user code needs so workflows stay portable and deterministic:
workflow.now(), workflow.uuid4(), workflow.random() — deterministic replacements for datetime.now(), uuid.uuid4(), random inside workflowsworkflow.wait_condition(), workflow.continue_as_new(), workflow.execute_workflow()workflow.unsafe.imports_passed_through() / workflow.unsafe.skip_determinism_enforcement() — sandbox escape hatchesactivity_heartbeat() — heartbeat from inside an activityWorkflowError, ActivityError, ParentClosePolicy — all from mistralai.workflowsCall activities directly (await my_activity(args)); timeouts and retries live on the @activity(...) decorator, not at the call site.
The documentation is organized into several categories:
mistralai client (client.workflows.*)client.workflows.events.get_stream_events_async(), NATS subjects, SSE APIcreate_test_worker, hang prevention, sandbox pitfallswf-diagnose locally or on Kubernetes to collect a diagnostic report for support triageQuick-test script — run any workflow in a local test environment with zero setup:
python .agents/skills/workflows/scripts/test_workflow.py <workflow_file> --input '{"key": "value"}' [--timeout 30]Timeout policy for testing: Use aggressive (short) timeouts to keep the feedback loop tight. A hanging test wastes more time than a false timeout. Defaults:
| Context | Recommended timeout | When to increase |
|---|---|---|
--timeout (quick-test script) | 15 seconds | Workflow makes multiple LLM calls or heavy I/O |
execution_timeout (pytest) | timedelta(seconds=10) | Known long-running workflow |
asyncio.wait_for (pytest) | 15 seconds | Should always be slightly above execution_timeout |
If a workflow is known to be long-running (e.g. multi-step agent, large data processing), increase timeouts proportionally — but start short and only raise them when you see legitimate timeout failures, not preemptively.
These are additional patterns and utilities not covered in the official docs:
Use this skill when you need to:
enforce_determinism=False)mistralai.workflows)mistralai/workflows-starter-app
57f0ada
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.