InfoGathererAgent
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).
InfoGathererConfig
questions
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) — whentrue, the agent insists the caller confirms the answer before moving on.
Omit this field to run the agent in dynamic mode (see questionCallback /
setQuestionCallback()).
questionCallback
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”).
name
Agent display name.
route
HTTP route for the agent.
agentOptions
Additional AgentBase options forwarded to the constructor.
Methods
setQuestionCallback
Register (or replace) the callback that resolves questions per request. Only
used in dynamic mode (when questions was not supplied at construction).