Info Gatherer
Prefab Agents
Prefabs are pre-built agent archetypes for common use cases. Use them directly or extend them to quickly build information gatherers, FAQ bots, surveys, receptionists, and concierges.
What Are Prefabs?
Prefabs are ready-to-use agent classes that implement common conversational patterns:
Why Use Prefabs?
- Faster Development: Pre-built conversation flows
- Best Practices: Proven patterns for common scenarios
- Extensible: Inherit and customize as needed
- Production-Ready: Includes validation, error handling, summaries
Quick Examples
InfoGatherer
FAQBot
Survey
Receptionist
Concierge
Chapter Contents
Importing Prefabs
Extending Prefabs
All prefabs inherit from AgentBase, so you can extend them:
Basic Usage
Question Format
Constructor Parameters
Flow Diagram

Built-in Functions
InfoGatherer provides these SWAIG functions automatically:
Dynamic Questions
Instead of static questions, use a callback to determine questions at runtime:
Accessing Collected Data
The collected answers are stored in global_data:
Complete Example
Best Practices
Questions
- Keep questions clear and specific
- Use confirm=true for critical data (email, phone)
- Limit to 5-7 questions max per session
- Order from simple to complex
key_name Values
- Use descriptive, unique identifiers
- snake_case convention recommended
- Match your backend/database field names
Dynamic Questions
- Use callbacks for multi-purpose agents
- Validate questions in callback
- Handle errors gracefully