Workflows

At a glance

The small set of concepts behind Workflows, and how they fit together.

Prerelease

Workflows turns content processes into data that people, agents, and applications can operate consistently.

Loading...

Workflows is organization-wide by design. One workflow can coordinate content across projects, datasets, Canvas, and Media Library through global document references.

The vocabulary at a glance

  • Engine: the TypeScript library that evaluates and commits workflow instances.
  • Definitions and instances: a definition describes a process; an instance is one run of it.
  • Stages and transitions: stages mark where an instance is; transitions define where it can move.
  • Fields: data carried by an instance, such as its subject, reviewer, or approval.
  • Activities and actions: activities model work associated with a stage; actions are caller-fired or triggered events.
  • Semantics: advisory labels on workflows, stages, activities, and actions. They help integrations explain meaning without changing execution.
  • Conditions and operations: conditions control gates and movement; operations describe state changes.
  • Effects and runtimes: effects queue external work; runtimes complete it.
  • Guards and enforcement: guards declare rules enforced by the Content Lake.
  • Subworkflows: compose a larger process from smaller workflow definitions.
  • Global document references: connect workflow instances to content across projects, datasets, and other Sanity resources.
  • The reactive session: the live application layer used by App SDK and Studio experiences.

What the engine is

The engine is a TypeScript library, not a hosted service. It owns the workflow domain model and commits every change to an instance through explicit verbs.

The CLI and MCP server operate the engine directly. The App SDK layer supplies reactive document access, and the Studio plugin sits on top of that layer to provide the Workflows interface.

How it fits together

A definition describes a process; an instance is one run, currently in one stage. Actions change its state, and transitions move it when their conditions hold. The engine continues that cascade until the instance settles.

Conditions express decisions in GROQ. Effects queue external work for a runtime. Guards deploy rules to the Content Lake. Reactive sessions keep application experiences current.

Next steps

Choose what you need next:

  • Getting started: deploy and run your first workflow.
  • Cookbook: adapt complete workflow examples.
  • Reference: look up exact types, fields, defaults, and engine verbs.

Visiting agent?

Was this page helpful?