SurveyAgent
Conducts automated surveys with support for multiple question types, response validation, and structured result summaries. The agent guides users through each question in sequence, validates answers based on the question type, and retries on invalid responses.
survey_name
Name of the survey. Used in the agent’s prompt and summary output.
questions
List of survey questions. Each dict must have id, text, and type:
questions[].id
Unique identifier for the question (e.g., "satisfaction"). Auto-generated as
question_N if omitted.
questions[].text
The question text to ask the user.
questions[].type
Question type. Valid values:
"rating"— numeric scale (1 toscale)"multiple_choice"— select fromoptionslist"yes_no"— accepts yes/no/y/n"open_ended"— free text response
questions[].options
Required for multiple_choice questions. List of valid answer options.
questions[].scale
For rating questions, the maximum value on the scale (e.g., 5 for 1-5).
questions[].required
Whether the question requires an answer. Non-required open_ended questions accept
empty responses.
introduction
Custom introduction message. Defaults to "Welcome to our {survey_name}.".
conclusion
Custom conclusion message. Defaults to "Thank you for completing our survey.".
brand_name
Company or brand name used in the agent’s persona.
max_retries
Maximum number of times to re-ask a question after an invalid response.
name
Agent name for identification and logging.
route
HTTP route for this agent.