Workflow output contracts and branch-specific outputs
Workflow output contracts define what a workflow must produce when it completes. Every workflow has either a single fallback output or a set of branch-specific outputs. The engine enforces the contract at the end of a run, and the run fails if the workflow produces the wrong output type for the selected branch.
Output kinds
The workflow engine supports three output kinds:
Kind | What the workflow must deliver |
|---|---|
answer | A chat-only response. The workflow should not create or upload a document. |
document | A generated or uploaded document. The workflow must produce a document file. |
table | A structured table or workbook. The workflow must produce the tabular output. |
Fallback output vs branch-specific outputs
When every terminal branch of a workflow produces the same deliverable, configure a single fallback output. When different branches produce different deliverables, use branch-specific outputs instead.
Fallback output — one output contract applied to every terminal branch.
outputs — one output contract per branch, so the deliverable matches the branch path taken.
Exactly one output branch should complete during a run. If the workflow produces the wrong kind for the selected branch, the run fails with an explicit error.
Contract enforcement
The engine checks the output at the end of each run. Common contract failures include:
Producing a document when the branch contract expects an answer.
Finishing without producing the required document output.
Finishing without producing any required output.
When no output contract is configured, the workflow detail page shows the message: "No explicit output contract is set."
How to configure branch-specific outputs
In the workflow builder, open the output section.
Add an output block for each branch that needs a distinct deliverable.
Select the output kind for each block: answer, document, or table.
Link each output block to its target branch.
Test the workflow to verify that each branch produces the correct output type.
When a branch-specific output is set, the engine only checks the contract for the branch that was selected. Unselected branches are skipped and their output contracts are ignored.
What to read next
Workflows Overview for building and running workflows
Resume a workflow run waiting on human input for resuming paused runs from chat
Playbooks to apply firm standards consistently