Optional
controllerRecovery hook invoked when the loop detects that progress has stalled. Implementations typically append a SystemMessage to re‑orient the agent.
Optional
getOptional function to request user input when the agents needs user input.
Optional
guidelinesSystem guidelines generator. Should embed the main instruction payload. It is not automatically inserted into the transcript; callers are expected to do so when composing the initial state.
Test whether the agent has reached its goal.
Optional
nameContext name used only for logging / debugging.
Optional
nextCallback to compute the next sequence in a multi‑stage workflow.
Returning undefined
ends the workflow after the current sequence.
Optional
registryOptional registry of callable tools.
Agent behaviour contract. All functions must be side‑effect‑free except for
getUserInput
, which is allowed to perform I/O.