Open Agent Loops
API Reference

all

@open-agent-loops/core


function all(...conditions): StopCondition;

Defined in: stop/conditions.ts:97

Combine conditions: stop only if ALL of them say so.

Parameters

ParameterTypeDescription
...conditionsStopCondition[]The conditions to AND together.

Returns

StopCondition

A StopCondition that fires only when every input fires (and the list is non-empty).

Remarks

Conditions are evaluated in order and short-circuits on the first false. An empty list never stops.

Example

// Stop only once we are past step 3 AND the tool has been called.
const stop = all(maxSteps(3), whenToolCalled("submit_answer"));

See

On this page