Deployments
A deployment is a named group of workers that owns a set of workflow definitions and receives all executions for those definitions. Workers join a deployment by setting the DEPLOYMENT_NAME environment variable at startup.
Run the worker by passing your API key as an environment variable:
DEPLOYMENT_NAME=invoice-service MISTRAL_API_KEY=your-key uv run python worker.pyAll workers running under the same DEPLOYMENT_NAME form a single deployment. They share identical workflow definitions and collectively receive all executions routed to that deployment.
Why deployments?
Why deployments?
Deployments give you four key capabilities:
- Worker isolation: In a shared workspace, each deployment exclusively receives executions for its registered workflows. Multiple teams can run workers simultaneously without interfering with each other.
- Automatic routing: When a single active deployment owns a workflow, executions route to it automatically — no manual configuration needed.
- Horizontal scaling: Run multiple workers under the same
DEPLOYMENT_NAMEto increase throughput. The platform distributes tasks across all of them automatically. - Lifecycle tracking: A deployment is considered active as long as at least one of its workers has heartbeated within the liveness window. Inactive deployments are excluded from routing.
tip
For a complete guide covering execution routing, conflict detection, and the Deployments API, see Managing Deployments.