InfoGathererAgent
Collects answers to a series of questions in sequence, with optional confirmation for critical fields. Supports both static questions (defined at construction) and dynamic questions (determined at runtime via a callback).
questions
List of question dictionaries. If None, the agent operates in dynamic mode where
questions are determined by a callback at request time. Each question dict has:
questions[].key_name
Identifier for storing the answer (e.g., "email").
questions[].question_text
The question to ask the user.
questions[].confirm
If True, the agent confirms the answer with the user before proceeding. Use for
critical data like email addresses and phone numbers.
name
Agent name for identification and logging.
route
HTTP route for this agent.
Built-in Tools
Dynamic Questions
Instead of static questions, use set_question_callback() to determine questions at
request time based on query parameters, headers, or request body:
set_question_callback
callback
A function receiving (query_params, body_params, headers) that returns a list of
question dictionaries in the same format as the questions constructor parameter.
Accessing Collected Data
Answers are stored in global_data and available in SWAIG function handlers: