Dive

Control steps

Control steps

Steps Dive runs itself to control a plan's flow, instead of calling a tool.

Use a control step's name as a step's tool_name. The conditions and bodies they share are described in Conditions and bodies.

NameDescription
routeRuns one of two or more branches, depending on a condition.
filterSplits a list into the items that pass a per-item condition and the items that don't.
mapRuns the same steps once for each item in a list and collects the results.
reduceFolds a list into one value by running the same steps for each item in order.
exitEnds the plan early, as a success or an error, when a condition holds.
agentHands one step to a model that calls tools until it can return structured output.
askAsks the person running the plan a question and uses their answer.