docs

Aggregator Node

The Aggregator node sits at the end of a Loop node's body subgraph. It waits for all iterations to complete and then merges every iteration's output into a single results array. Downstream nodes receive the full collected data in one go — no manual array construction required.

Collect Signals
Collect all
input
result

Configuration

About

How It Works

Connect the last node in your Loop body to the Aggregator's input handle. The execution engine automatically collects every iteration's output and passes it to the Aggregator — no special wiring beyond the edge connection is needed.

BTC Candles
CoinGecko
Loop Candles
One item per iteration
Compute Signal
python · 8 lines
Collect Signals
Collect all
Summarise
Claude Sonnet 4.6

The Aggregator fires once — after the last iteration completes. Downstream nodes see the full merged result, not individual iteration outputs.


Configuration

The Aggregator has no required configuration. Simply connect the last node of your loop body to its input and it will collect everything automatically.


Output Schema

FieldTypeDescription
resultsarrayAll iteration outputs in order. Failed iterations appear as { _error: "...", _index: N }.
totalnumberTotal iterations processed
successCountnumberNumber of successful iterations
errorCountnumberNumber of failed iterations
durationMsnumberWall-clock duration of the entire loop in milliseconds

Reference outputs in downstream nodes as {aggregator.results}, {aggregator.total}, etc.


Accessing Results Downstream

After the Aggregator, downstream nodes receive the full merged output. A Function node reading the collected signals:

# All iteration results as an array
signals = inputs['aggregator']['results']

# Filter only buy signals
buy_signals = [s for s in signals if s.get('signal') == 'buy']

return {
    'buy_count': len(buy_signals),
    'total': inputs['aggregator']['total'],
    'error_count': inputs['aggregator']['errorCount'],
}

Nested Loops

When using nested loops, each loop level has its own Aggregator. The inner Aggregator collects results from the inner loop and its output becomes an item available to the outer loop body or its Aggregator.

Outer Loop
Loop over symbols
Inner Loop
Loop over candles
Analyse Candle
python · 8 lines
Inner Aggregator
Collect candles
Outer Aggregator
Collect symbols

Each Aggregator scope is determined automatically — the inner Aggregator collects iterations from the inner loop, and the outer Aggregator collects from the outer loop.

Loop nesting is limited to 2 levels deep. See Loop Node — Nesting Loops for details.


Error Handling

Failed iterations are always tracked in errorCount. When an iteration fails:

  • It appears in results as { _error: "error message", _index: N }
  • errorCount is incremented

Use the Loop node's Continue on error setting to control whether a single failure halts the loop or is logged and skipped.


Placement Rules

One Aggregator per Loop node. If you need to process results differently after collecting them, add nodes after the Aggregator (outside the loop body).


Next Steps

  • Loop Node — Configure the iteration source and error policy.
  • Function Node — Write per-iteration logic inside the loop body.
  • LLM Node — Analyse or summarise the aggregated results downstream.
  • Conditional Node — Branch on successCount, errorCount, or results.
  • Storage Node — Persist the aggregated results for later retrieval.