Conditions
exit, route and filter each test one condition. A step takes exactly one of three kinds: a comparison, infer or decide.
Comparison
value, op and to compare two values without a model call. value is usually a template.
infer
infer is a yes/no question for a chat model, with the data in the question as templates. It runs on the judge model role, and model picks another. The model returns a verdict and a reason. On filter, it asks once per item, and concurrency sets how many at once.
decide
decide asks a decision model, which returns a probability instead of a verdict. It needs a decider role on a decision-model provider.
infer refuses a decision model, and decide refuses a chat model.
Bodies
A body is the steps a control step runs:then, else and cases on route, and do on map and reduce. It’s one tool call or a list of steps.
Inside a body, steps read these values as well as the plan’s inputs and earlier results:
Templates in a body render only when it runs:
route renders the branch it takes, and map renders its body once per item.