How early access works
What building on Workflows during early access commits you to: one fixed 0.x stack, a stricter contract for stored documents, what the Content Lake does not yet enforce, and the runtime you supply.
Workflows is in early access. In practice, that means:
- The package APIs are pre-1.0 and can change in a minor release.
- The documents the engine stores have a stricter compatibility promise than the APIs.
- Some guarantees of a released product aren’t in place yet. For example, the Content Lake doesn’t enforce guards yet.
- You operate the runtime: the app, server, or Function that calls the engine to move instances forward and run effects.
Versions and breaking changes
Workflows packages release together at one version. Install the packages your application uses at matching versions. Each package remains on 0.x, so a minor version can include breaking API changes. Read the release notes and package changelogs before every upgrade.
Stored-data compatibility
The 0.x version number covers package APIs. Stored workflow documents have a separate compatibility contract: new engines must keep reading existing documents, and writers cannot silently make old data incompatible.
The engine writes three document types:
sanity.workflow.definition: stored in the deployment’s workflow resource.sanity.workflow.instance: stored in the deployment’s workflow resource.temp.system.guard: stored in the same resource as the content it protects.
Each definition and instance carries two version numbers. modelVersion is the data model version of the engine that wrote it. minReaderModel is the document's reader model: the lowest data model version an engine must support to read that document safely.
An engine reads every model version up to its own. So upgrading the engine never leaves a stored document unreadable. If an engine finds a document whose minReaderModel is higher than its own model, it doesn’t guess at the shape. It throws ModelVersionAheadError and tells you to upgrade @sanity/workflows.
Reader-model compatibility
A deployment’s expectedMinReaderModel is the reader model you have verified across every runtime that shares its workflow resource. Write it as a number you have reviewed. A package upgrade doesn’t raise it, and isn’t on its own a reason to raise it. Raise it only after you upgrade and verify every runtime that shares the workflow data. An engine commit can raise an existing instance’s reader model even if you don’t redeploy a definition. For the rollout steps and feature requirements, see Upgrade Workflows packages.
What is not enforced yet
Every check the engine makes is advisory. Action verdicts, permission checks, readiness checks, and editability checks exist so a UI can disable the right controls and explain why. Anyone with a write token can write to the Content Lake directly and skip the engine. So the Content Lake is the only place that enforces anything. Treat an engine check as a UI aid, never as a security boundary.
A guard is a document the engine deploys next to the content it protects. During early access, the Content Lake doesn’t enforce guard documents, so a client that writes directly isn't stopped. Guards are meant for rules that must always hold. In early access, a guard does two things: it previews an allow or deny verdict in Workflows-aware interfaces, and it explains why the engine refused a commit. Until the Content Lake enforces guards, put any rule that must not be bypassed in dataset access control. For details, see Guards and enforcement.
The engine also uses one token for two jobs. The caller’s token both identifies who is acting and makes the engine’s own writes. This can cause a lockout. Dataset access control, or a future enforced guard, checked against an editor’s token can block the engine’s housekeeping, such as deploying and removing guards. The editor is then stuck in a stage they can no longer advance or clean up. Actors and enforcement explains the identity model.
Runtime responsibilities
Workflows is a library, not a service. The engine acts only when your code calls it. Nothing advances on a timer. A queued effect waits until code you run, such as a Sanity Function or a server, calls engine.drainEffects(). To run queued effects, start autonomous workflows, and react to time without running your own server, generate Functions from your workflow definitions.
Not available yet
Blueprints can deploy the Functions that operate workflows, but the Blueprints service does not yet register the sanity.workflow resource. Deploy definitions with npx sanity-workflows deploy before deploying their Functions.
npx sanity-workflows blueprints generate creates Sanity Functions from your workflow definitions. Declaring runtime.kind: 'durableFunction' does not create a durable workflow runtime. Generate Functions from your workflow definitions covers when generated triggers run, heartbeat recovery, and drift checks.
Related
- Deployments and partitions: where definitions and instances are stored, how partitions keep environments apart, and how a workflow reaches content in other resources. In early access, the deployment’s
workflowResourceis the only place definitions and instances are stored. If that changes, the release notes will name the new location and the migration steps. nuke: discard a deployment's workflow data during development instead of migrating it. Upgrade Workflows packages explains when a reset is the better option.
Visiting agent?
Workflows has MCP tools that let an agent inspect, operate, author, validate, and deploy workflows. An agent host embeds these tools. Ask the person you work for whether your host includes the Workflows tools.
Was this page helpful?
Feedback submitted, thanks for helping us improve the docs. Have you tried these alternatives?