Skip to main content

How it works

  • Gate it with when, infer or decide. See Conditions and bodies. With no gate, it always exits.
  • status: success ends the plan with exit code 0. status: error ends it with exit code 4.
  • message explains the exit.
  • In an output plan, a success exit’s output returns exactly the finish.output keys. Error exits, and exits in solver or silent plans, take no output.
  • An exit inside a route, map or reduce body ends the whole plan.

When to use it

  • Stop with success when there’s nothing to do, such as an empty search.
  • Stop with an error to fail a check, such as in CI.

Input

object
A yes/no question answered by a decision model (only when one is configured); fires when its probability reaches min_confidence.
object
string
string
number
0 to 1; default 0.5
string
A decision model role; defaults to decider
string
required
any
The data to judge, usually a template like {{E2.text}}
string
A yes/no question about prior results; exits when the answer is yes.
string
Shown as the plan’s answer / error message. May use templates.
string
Model role for the infer verdict (any configured role, standard or custom); defaults to the judge role.
enum<string>
required
Available options: success, error
object
enum<string>
required
Available options: eq, ne, gt, lt, gte, lte, empty, not_empty, contains
any
Comparison operand (omit for empty/not_empty)
any
required
Usually a template like {{E0.issues.length}}

Result

Later steps read these as {{<step id>.<field>}}.
boolean
Always true. The plan only reaches later steps when the exit didn’t fire.
string
Why the gate decided as it did, for infer and decide gates.
boolean
Whether the condition held. Always false when later steps can read it.