DocsOpen Workflows

Build

YAML reference

Every field a workflow file accepts. Names are PascalCase, durations are ISO 8601 (PT30S) or a TimeSpan (00:00:30), and a field the engine does not know is refused when the workflow is uploaded.

Top-level fields

WorkflowstringRequired
The workflow’s name. It can change; the workflow’s id does not.
Descriptionstring
What the workflow does, as a calling model reads it. Required for a workflow another workflow binds.
Triggersentry[]Required
The requests the workflow accepts, each under New with a JSON Schema.
ModestringDefault Queue
What a request does while a turn is live.QueueRejectSupersedeQueueThenSupersedeAfterQueueThenRejectAfter
WaitTimeoutduration
Required by the two modes ending in After, refused by the others.
StandalonebooleanDefault true
False leaves the workflow to be called by other workflows only; starting a run on it is refused.
Modelmodel selectorDefault auto
The models the workflow’s model steps run on where they name none. Where absent, the steps ask for auto: the models the organization lists in Settings › Models, tried in order.
Instructionsstring
Instructions for every model step: raw text, or a reference to a prompt Momor holds.
Operationsbinding[]
Every tool, workflow and wait the steps may name.
Functionsfunction[]
Reusable expressions, each with Name, Parameters and Body.
Budgetobject
What a turn of this workflow may spend. Declaring it requires OnExhausted.
Callsinteger
Operation calls.
Roundsinteger
Model requests.
Durationduration
Working time, with time spent waiting left out.
MemoryProbesinteger
Memory reads. Declared on the workflow’s Budget only.
OnExhaustedpolicy
What happens when the Budget runs out.BestEffortWaitReturn: <value>
RecoveryModestringDefault Manual
How a failed turn is resumed.ManualAuto
Outputoutput contractRequired
What the workflow returns.ContentStructured: <schema>ToolResult
Replyobject
On a ToolResult workflow only: the field the closing reply is returned under, and its shape.
Stepsstep[]Required
The steps, in order.
OnAfterhook[]
Hooks run after a turn ends.
StreambooleanDefault true
Whether model text is sent live as it arrives. What is recorded is the same either way.
GatherstringDefault AsNeeded
The default for model steps. Always requires each reply to call an operation.AsNeededAlways
KnowledgestringDefault Open
The default for model steps. ToolsOnly answers from results already in the conversation.OpenToolsOnly

Operation bindings

KeyLocatorBinds
Tool
embedded://…, mcp://…, or *
A tool. A trailing * binds every match; Locator: "*" binds every registered tool.
ProviderTool
embedded://…
A tool the model’s own provider runs inside its reply.
Workflow
<workflow id>
Another workflow. Trigger names its request where it accepts several.
Wait
embedded://…
A registered wait. The binding’s name is the registration’s name.
Operations:
  - Tool: Fetch
    Locator: embedded://momor.ai/services/tools/fetchPage
  - Workflow: Intent
    Locator: 85d12c16-c88a-47e5-94a9-28b16fa05436
    Trigger: Request
  - Wait: Clarification
    Locator: embedded://momor.ai/services/tools/clarification

Step fields

Every step takes an optional name, as the value of its key or as Name. These are the fields each kind adds.

KindFields
Instructions (required), Model, Operations, Output, Attempts, Gather, Knowledge, OnExhausted
Operations (required), Input, Attempts, OnExhausted
ExecuteModelToolCall
Operations, Input, Attempts, OnExhausted
DeliverResults
Input
Cases (When, Then; required), Else, Output, Attempts, OnExhausted
Items (required), Each, Operation or Steps, Input, Output, Attempts, OnExhausted
Operation (required), Question (required)
Operations (required), Input, Attempts, OnExhausted
Repeat
Rounds, Steps, Output, OnExhausted
While
When, Steps, Output
Exit
None. Last step of a Repeat, While or ForEach body.
Guard
Key, Around (one step), Scope (Tenant or User), Ttl
RefineLoop
Operation, ConfidenceScore, Rounds, OnExhausted, Model, Gather, Knowledge, Input, Attempts
AgentCall
Agents, Input, Attempts, OnExhausted
Supervise
Mode, Models, Instructions, Agents, Budget, OnExhausted, Input, Output, Attempts
Debate
Mode, Instructions, Models, Budget (Rounds), Attempts, OnExhausted
Scope
Budget, OnExhausted and Steps, all required

Model selectors

Written asSelects
auto or *
Any model.
claude-sonnet-4-6
That model.
tier/high
Any model in the tier: Free, Low, Medium, High or XHigh.
anthropic/*
Models the publisher published, whoever serves them.
togetherai/anthropic/*
That publisher’s models served by that provider.
{ System: Decision }
Models of one system: Chat, Decision, Transcribe or Ocr.

The object form takes Name, Tier, Publisher, Provider and System together: { Name: Auto, Tier: High, Provider: Anthropic }. Selectors work as they do in Gateway.

Output contracts

Output: Content
Output: ToolCall
Output: ToolResult
Output:
  Structured:
    type: object
    required: [Topic]
    properties:
      Topic: { type: string }
Output:
  OneOf: [Content, ToolCall]

ToolCall and OneOf apply to model steps; ToolResult to a workflow’s own Output.

Diagnostics

An upload is compiled before anything is stored. A refused upload answers 422, or 400 where the YAML does not parse, with one line per problem: where it is, a stable code, the field path and what is wrong.

workflow.yaml(14,7): error MOMOR012: Steps[1].Operations: The step names the operation 'Refund', which Operations leaves undeclared.
CodeMeans
MOMOR010
The YAML does not parse. Answered with 400.
MOMOR011
The YAML parses, but a field or a step is not one the engine knows.
MOMOR012
The workflow is well formed but cannot be admitted: an undeclared operation, a locator that matches nothing, a limit above the deployment’s ceiling.
Updated Oct 22, 2026
Esc