iterationProgressHint
iterationProgressHint(
options?):AgentHooks
Defined in: agent/hints.ts:154
Creates a proactive hint that informs the LLM about iteration progress.
This hint is injected before each LLM call (via beforeLLMCall controller), helping the LLM understand how much “budget” remains for completing the task.
Parameters
Section titled “Parameters”options?
Section titled “options?”Configuration options
Returns
Section titled “Returns”AgentHooks that can be merged with other hooks
Example
Section titled “Example”// Basic usage - show on every iterationconst hooks = iterationProgressHint();
// Show only when running low on iterationsconst hooks = iterationProgressHint({ timing: "late" });
// Custom templateconst hooks = iterationProgressHint({ template: "Turn {iteration} of {maxIterations}. {remaining} turns left.",});