Skip to content

Workflow YAML reference

The Compiler reads workflow.yaml from the package root. Workflow and Stage source objects are strict; unknown fields and duplicate YAML keys are rejected.

Workflow document

FieldMeaning
workflow.nameRegistered execution name (flowName)
workflow.exclusiveOptional boolean; true excludes competing active Runs in the same host
workflow.entryEntry Stage key
workflow.stages.<key>.stageStage resource reference
workflow.stages.<key>.on.<outcome>{ target: <stage-key> } or { end: true }

Stage document

FieldMeaning
stage.nameStage name matching its Workflow declaration
stage.state.schemaZod Schema resource reference
stage.state.initializeState initializer resource reference
stage.entryEntry Step key
stage.steps.<key>Code or Agent Step

A Code Step contains type: code, code: <reference>, and on routes.

An Agent Step contains type: agent, agent: <reference>, llm, outputSchema: <reference>, and on routes. Optional skills and tools arrays default to empty. Runtime model roles are reasoning, coding, and review.

For either Step type, each on.<outcome> is { target: <step-key> } or { end: true }. A Stage end forwards that outcome to its Workflow-level route. Do not put both target and end in one route.

Names must be nonempty, have no surrounding whitespace, and avoid reserved object keys __proto__, prototype, and constructor. Entries and targets must resolve within their respective topology.

Resource references

ReferenceSource
@stages/reviewstages/review.yaml
@agents/revieweragents/reviewer.md
@skills/reviewskills/review/SKILL.md
@codes/checkDefault export from codes/check.ts
@schemas/stateDefault export from schemas/state.ts
@initializers/stateDefault export from initializers/state.ts
@tools/review:readDraftNamed export readDraft from tools/review.ts

TypeScript resources accept a :exportName selector; without it they use the default export. Stage, Agent, and Skill references have no export selector. Nested resource directories are supported. References must stay within their resource directory and cannot use traversal, backslashes, or .d.ts source files.

These @... values are Compiler source references, not TypeScript import aliases. Relative TypeScript source imports use .ts; output imports are rewritten to .js.

Markdown metadata

Agent and Skill Markdown starts with YAML frontmatter containing name and description; the body contains instructions. Step YAML binds the Agent to its model role, Tools, Skills, and final output Schema.

Package metadata and exports

{
  "type": "module",
  "intloom": {
    "type": "workflow",
    "version": "2026-10-08"
  },
  "exports": {
    ".": {
      "types": "./dist/workflow.generated.d.ts",
      "default": "./dist/workflow.generated.js"
    }
  },
  "files": ["dist"]
}

This fragment supplements a full package manifest, including name, version, and runtime dependencies. Compiler validates the source package's generated-entry layout. It emits named blueprint, codes, and agentSpecs exports; it does not publish an internal wrapper or instantiate Agents at build time.

See Create a Workflow for a complete package and Compiler for build behavior.