Add iterations to Agents

Last updated: June 11, 2026

Overview

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, taking multiple inputs and producing multiple outputs within a single Agent run.

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. Examples include:

  • Analyzing a list of URLs to identify common themes in their content and structure, then optimizing an owned piece of content accordingly.

  • Collecting prompt responses across multiple answer engines, regions, or topics and conducting bulk analysis on brand and product mentions to surface trends.

  • Iterating over a list of Reddit threads to generate a clean report on top narratives and recurring themes.


Add an Iteration node

lick the + icon in the Agent Editor and select Iteration. Alternatively, drag Iteration from the node selection menu into the workflow.

iterations-1.png

Iterations require a list of items as the input. The node loops through each item 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, and building the steps that execute on each iteration. The node contains its own self-contained editor, modeled after the broader Agent builder.

Iterations_3.png

Iterate Over a List Input

An Iteration node requires a list as your Agent input. To configure a list input, select the input node, add a new input, and choose List from the dropdown.

Iterations_2.png

Configure your Iteration node

Click the node to open the node settings menu, then select the list input as the value to iterate on.

The output of an Iteration node defaults to the outputs of the last node within it.

Add your Iteration steps

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 drag a node in from the node selection menu.

Each step repeats for every item in the list. Place any node that should run only once outside the Iteration editor.

Structure your output

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.

Screen Shot 2026-04-26 at 8.24.04 PM.png

Iteration node requirements

There are several requirements to ensure an Agent executes as expected:

  • The list variable used as input must exist and must be created as an Agent input using the list type.

  • The current item variable is only accessible within the steps inside the loop and cannot be referenced in steps outside the Iteration node.

  • Steps inside the loop execute once per item in the list.

  • The Iteration node must connect to an End step or additional steps to complete the Agent run.