OptionalcontrollerRecovery hook invoked when the loop detects that progress has stalled. Implementations typically append a SystemMessage to re‑orient the agent.
OptionalgetOptional function to request user input when the agents needs user input.
OptionalguidelinesSystem 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.
OptionalnameContext name used only for logging / debugging.
OptionalnextCallback to compute the next sequence in a multi‑stage workflow.
Returning undefined ends the workflow after the current sequence.
OptionalregistryOptional registry of callable tools.
Agent behavior contract. All functions must be side‑effect‑free except for
getUserInput, which is allowed to perform I/O.