Add Iterations to Agents
Last updated: April 27, 2026
The Iteration node loops through a list within an Agent, executing the same sequence of steps for each item automatically.
By default, an Agent processes a single input and produces a single output. The Iteration node extends this by applying the same process across an entire list. It takes multiple inputs and produces multiple outputs within a single Agent.
Use an Iteration node when an Agent must perform a repeated action across multiple values, such as running an LLM prompt for each item in a list of keywords or URLs. Because the Iteration node is highly versatile, it serves a variety of use cases. Examples include:
Analyzing a list of URLs to identify common themes in their content and structure, then optimizing an owned piece of content accordingly.
Collect a list of prompt responses across multiple answer engines, regions, or topics and conduct bulk analysis on brand and product mentions to surface trends.
Iterate over a list of Reddit threads to generate a clean report on top narratives and recurring themes.
Add an Iteration Node
Click the "+" icon in the Agent Editor and select "Iteration" to add an Iteration node. Alternatively, you can click and drag the "Iteration" option into the workflow from the node selection menu.

Iterations require you to connect a list variable or an array as the input. The node will loop through each item in the list sequentially, passing the current item as a variable to the steps inside the loop.
Configure an Iteration Node
Configuring an Iteration node requires two things: passing in a list or an array, and building the steps that execute on each iteration. The node contains its own self-contained editor window, modeled after the broader Agent editor.

Iterate Over a List Input
An Iteration node requires a list or an array as your Agent input. To configure a list input, select the input node, add a new input, and choose “List” from the dropdown.

Iterate Over a Prompt LLM Array
Alternatively you can use an array output from a Prompt LLM node as an input for the iteration node. In the Prompt LLM node's output settings, add a structured field and set the type to array. Write a prompt so the model returns a list of values that populates the array.

Once the Prompt LLM node runs, its array output becomes available as an input source for your Iteration node. In the Iteration node settings, select that array field as the value to "Iterate On."

Configure Your Iteration Node
Click the node to open the node settings menu. From here, select the list input as the value to “Iterate On”.
The output of an Iteration node will default to the outputs of the last node within the Iteration node.
Add Your Iteration Steps
You can add nodes to the Iteration node the same way you add nodes to the Agent editor. Click the “+” icon in the Iteration editor and select a node, or click and drag a node in from the node selection menu.
Each step repeats for every item in the list. If you want a node to process only once, place it outside the Iteration Editor.
Structure Your Output
You can add output fields to map your final results when using the Prompt LLM node. In your LLM prompt, specify what information should populate each field — for example, "Return each URL in the urls output field." Then add those same fields as structured output fields in the node settings.

Iteration Node Requirements
There are several considerations to ensure an Agent executes as expected:
The list variable used as input must exist. It must be created as an Agent input using the list type.
The current item variable is only accessible within the steps inside the loop. It cannot be referenced in steps outside of the Iteration node.
Steps inside the loop are executed once per item in the list.
The Iteration node must ultimately connect to an Output step or additional steps to complete the Agent run.