Skip to main content

Batches

When a step produces many results, the next depth has to decide how to consume them: one agent run per result, or a single run that sees them all. That choice is what open·kritt calls batching.

Multi-output steps

A step marked multi-output may emit zero, one, or many results per input. A depth-0 step that enumerates HTTP routes, for example, might emit 20 results - one per route.

One at a time (default)

By default, each step at the next depth runs once per result from the level above. Each run gets its own context with that one result's keys merged in.

Depth 0 → emits 20 entrypoints
Depth 1 → runs 20 times, once per entrypoint
each run sees {{entrypoint}}, {{file_path}}, ...

This is the "one at a time" mode you see on a step in the builder - ideal for focused, per-target analysis.

All at once (consume all)

Switch a step to all at once (consume-all) and it runs a single time, receiving the entire previous level as one array. The array is exposed as multi_output_depth_<N>, where N is the previous depth.

Depth 0 → emits 20 entrypoints
Depth 1 (all at once) → runs once
sees {{multi_output_depth_0}} = [ ...20 results... ]

Use this when a step needs to reason across all results together - deduplicating, ranking, or picking the most promising candidates.

Next: how levels are numbered and grouped in depth and siblings.