Skip to content

Workflows and blocks

Workflows compose blocks into a versioned template whose dependencies and review gates control a Run.

Workflows are templates of linked blocks in Agents & Workflows. Each block owns one step. A Run executes a saved version of the template.

Ownership

A Workflow owns its blocks, links, entry points, and launch settings. An Agent block points to a saved Agent. It does not take ownership of that Agent's definition. The Console template editor at /workflows/definitions/[workflowId] shows the graph. Follow Build and launch when you need to turn a definition into work with readable results.

Lifecycle

A Workflow draft must pass validation before publication. Publishing freezes a version and pins the accepted Agents it uses. A later draft does not rewrite that version. Within a Run, a successor block can advance after all its predecessors are completed or skipped. A failed block causes failure to pass to its successors. Cancellation follows a separate path from block completion.

Boundaries

A Workflow definition is not a Run. Publication checks the graph and launch rules. It does not prove that execution succeeded. A block can narrow its Agent's allowed tools and limits, but cannot widen them. The workflowCommand label means an operation can run inside a Workflow. It is not a public Surface, endpoint, or client that you can call directly.

Failures

A Workflow cannot publish an invalid graph or an Agent that lacks an accepted version. WORKFLOW_AGENT_DRAFT_ONLY names that missing Agent version. A publish conflict means the reviewed draft changed before publication. A block that fails during execution needs a different response: inspect the retained Run and its error. Editing the template alone does not repair the execution that used an older version.

Recovery

A Workflow publication refusal leaves the draft available for repair. Read the named validation issue, correct the draft or its Agent, then review the saved version again. For a failed block, use Reviews and repair to choose a supported action for the Run's state. The Agent editor start contract describes the separate, one-block path for checking a saved Agent.

  • Read Agents for the worker definition and credential boundary a block uses.
  • Read Runs and readback to inspect the version, block state, and result that actually ran.