Skip to main content
A workflow is a script with a name and a typed interface: JSON Schemas for its input, its output and each signal it accepts. Your harness registers workflows, and so does the model, with the agent tool save_workflow: a procedure it wrote once becomes a building block of its later scripts.

Typed end to end

Registering a workflow checks its script against its toolset and its own schemas: main must accept the input and return the output, and signal() only takes a declared name and returns that signal’s type. A script that starts the workflow is checked against the same schemas before it runs.
A script that uses the workflow repo_check

Versions

Each registration is a new immutable version, identified by its digest (repo_check@9fbd13f4bb9b). A toolset that names a workflow pins its latest version when it is registered, as it pins the schemas of MCP tools. Runs that are already going keep their version: changing a workflow never breaks a run in flight.

Attached and detached runs

A run started by a script is attached to it: the parent does not end before its attached children, and a parent that fails, is cancelled or aborted cancels the children still running. A forgotten result() is harmless. A run started with detached: true lives on its own: start a long workflow and move on.

Started by your harness

Your harness starts runs of a workflow too, by name (its latest version) or by version, and signals them:
A run of a workflow accepts only the signals its workflow declares, with a payload that matches their schema; anything else is refused (422), whoever sends it. In the dashboard, a run of a workflow shows its workflow and version, the run that started it, and the runs it started in Runs started. See Workflows in the SDK.