Open Agent Loops
API Reference

not

@open-agent-loops/core


function not(condition): StopCondition;

Defined in: stop/conditions.ts:120

Invert a condition.

Parameters

ParameterTypeDescription
conditionStopConditionThe condition to negate.

Returns

StopCondition

A StopCondition that fires exactly when condition does not.

Example

// Continue (do not stop) until the tool has been called.
const keepGoing = not(whenToolCalled("submit_answer"));

See

On this page