Learn about different types of task steps and their use
These steps control the flow of the task. They are used to create conditional logic, loops, and parallel execution.
These steps are used to get and set values in the task.
These steps are used to iterate over a collection.
These steps are used to create conditional logic.
These steps are used to control the flow of the task.
auto_run_tools
is set to true
in a prompt step, any tools available to the agent will be automatically executed if the model decides to use them. The results are then fed back to the model to continue processing. This is particularly useful for creating autonomous workflows where the agent can gather information and make decisions without manual intervention.response_format
setting allows you to request structured output from the model. There are two main options:type: json_object
- Ensures the model responds with valid JSONtype: json_schema
- Enforces a specific JSON structure defined by a schemaresponse_format
, make sure to instruct the model to produce JSON in your prompt (via system or user message) for best results. Response format support varies by model provider - check the supported models documentation for compatibility.re
: Regular expressions (safe against ReDoS)json
: JSON encoding/decodingyaml
: YAML parsing/dumpingstring
: String constants and operationsdatetime
: Date and time operationsmath
: Mathematical functionsstatistics
: Statistical operationsbase64
: Base64 encoding/decodingurllib
: URL parsing operationsrandom
: Random number generationtime
: Time operationsNEWLINE
: Newline charactertrue
: Boolean truefalse
: Boolean falsenull
: None valuearguments
passed from the main workflow to the subworkflow are available in the steps[0].input
of the subworkflow.result
of the subworkflow is available in the steps[1].output.result
of the main workflow.Input/Output Data References
between steps is exclusive to the workflow they are defined in.
A workflow cannot reference the input
or output
of another workflow between the steps. To learn more about Input/Output Data References
click here.state
object, which can be accessed anywhere in the workflow using state.variable_name
. For example:
state
object. Values set in one subworkflow are not accessible from other subworkflows or the parent workflow.$ steps['label_name'].input.attribute_name
or $ steps['label_name'].output.attribute_name
syntax. For example:
parallelism
if not mentioned is 100. If mentioned, it is the maximum number of steps that can run in parallel concurrently.over
step, the map
step is executed for each value in the collection.reduce
step is executed after the map
step.