Skip to main content

Workflow

This page is auto-generated from the formations OpenAPI spec. Do not edit manually — run pnpm generate-formations-resource-docs to regenerate.

Creates a workflow — a state-machine definition (named states, allowed transitions, guards, and per-state automation) that tasks live in. State and transition dispatch references (agent_id, orchestration_id inside an on_enter block) accept { "ref": "LogicalId" } expressions to point at agents or orchestrations declared in the same template, so a workflow plus the agents that service its states can deploy as one stack. Mirrors the workflows REST contract (states, transitions, payload_schema).

Syntax

type: workflow
properties:
name: String
description: String
states: Object[]
transitions: Object[]
payload_schema: Object

Output

The physical resource ID is the public ID of the created resource. Reference it from other resources with a ref expression:

some_field:
ref: MyWorkflow

Properties

name

Human-readable name for the workflow, unique within the project

Required: Yes Type: String


description

Optional description of what the workflow models

Required: No Type: String Nullable: Yes


states

Named states. Exactly one must be initial: true; any number may be terminal: true. A kind: human state parks the task until a transition fires; an on_enter block dispatches one agent generation or orchestration run on entry.

Required: Yes Type: Array of Object


transitions

Named, directional moves between states. Each has from (source states) and to (one target), an optional JSON Logic guard, and an optional requires_approval gate.

Required: Yes Type: Array of Object


payload_schema

Optional JSON Schema describing a task's payload

Required: No Type: Object Nullable: Yes