Workflows reference
Sharing a workflow, its HTTP API and its MCP tools. For exact field tables, placeholder grammar and validation rules (also what to hand a coding assistant that must generate a workflow), see the workflow authoring spec.
Sharing a workflow
Export a workflow to YAML (its steps and the agents they use) and import it elsewhere from Workflows → Import. When an agent name already exists you can reuse it, replace it, or keep both. See import & export.
- Not carried: webhook tokens, and the schedule's enabled state (a carried schedule arrives paused).
- Carried: each step's tool-server allowlist; the import preview warns about servers this machine can't attach.
API surface
Workflows live under /api/workflows. The full route table, request bodies and error codes are in the authoring spec's REST surface. Two things a client usually needs:
- Lifecycle changes broadcast a
workflow.changedSSE event, so there is no need to poll. - Every workflow read includes
run_progress(null if the workflow never ran): the newest run'srun_number,status,done/totalpositions andcurrent_position(null when nothing is in flight). It drives the gallery progress bars.
MCP tools
Steps read and write pipeline state with workflow_state_list, workflow_state_get, workflow_state_set and workflow_state_delete on Precursor's own MCP server. workflow_id defaults to the workflow currently running the calling agent (resolved per call, so a shared agent writes to the right pipeline); pass it explicitly otherwise.
To serve these tools to external MCP hosts, enable Workflow state under Settings → MCP servers → Precursor capabilities.