Sequentially asks a caller a list of questions and stores each answer in
global_data. Supports static mode (questions provided at construction)
and dynamic mode (questions resolved per request via a callback).
Questions to ask (static mode). Each InfoGathererQuestion has:
key_name (string, required) — key used to store the caller’s answer.question_text (string, required) — the question to ask.confirm (boolean) — when true, the agent insists the caller confirms
the answer before moving on.Omit this field to run the agent in dynamic mode (see questionCallback /
setQuestionCallback()).
Convenience alternative to calling setQuestionCallback() after
construction. Consulted only when questions is not provided. Signature:
If the callback throws or is not registered in dynamic mode, the agent falls back to a built-in two-question list (name + “how can I help”).
Agent display name.
HTTP route for the agent.
Additional AgentBase options forwarded to the constructor.
Register (or replace) the callback that resolves questions per request. Only
used in dynamic mode (when questions was not supplied at construction).