Open Agent Loops
API Reference

any

@open-agent-loops/core


function any(...conditions): StopCondition;

Defined in: stop/conditions.ts:69

Combine conditions: stop if ANY of them say so.

Parameters

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

Returns

StopCondition

A StopCondition that fires when at least one input fires.

Remarks

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

Example

const stop = any(maxSteps(10), whenToolCalled("submit_answer"));

See

On this page