InfoGathererAgent
Sequentially collects named fields from a caller through conversational interaction.
Tracks fields per call, validates values with optional regex patterns, and fires an
onComplete callback once all required fields are gathered.
InfoGathererConfig
fields
Fields to collect from the caller. Each InfoGathererField object has:
name(string, required) — Unique field name used as the key in collected data.description(string, required) — Human-readable description shown to the AI agent.required(boolean, defaulttrue) — Whether this field must be collected before completion.validation(RegExp | string) — Optional validation pattern. Strings are compiled toRegExp.
introMessage
Opening message the agent speaks when the call starts.
confirmationMessage
Message spoken after all required fields are gathered.
onComplete
Callback fired when all required fields have been collected. Receives a record of field names to their collected values.
name
Agent display name.
agentOptions
Additional AgentBase options forwarded to the constructor.