type AgentLoopStrategy = (state) => boolean;type AgentLoopStrategy = (state) => boolean;Defined in: types.ts:625
Strategy function that determines whether the agent loop should continue
Current state of the agent loop
boolean
true to continue looping, false to stop
// Continue for up to 5 iterations
const strategy: AgentLoopStrategy = ({ iterationCount }) => iterationCount < 5;// Continue for up to 5 iterations
const strategy: AgentLoopStrategy = ({ iterationCount }) => iterationCount < 5;