For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
GuidesReference
GuidesReference
    • Core
      • Overview
    • Agents
      • Overview
      • AgentBase
      • AgentServer
      • Configuration
      • ContextBuilder
      • DataMap
      • FunctionResult
      • Helper Functions & Utilities
      • LiveWire
      • PomBuilder
      • Prefabs
      • SkillBase
      • SkillManager
      • SkillRegistry
      • Skills
        • ApiNinjasTriviaSkill
        • AskClaudeSkill
        • ClaudeSkillsSkill
        • CustomSkillsSkill
        • DataSphereServerlessSkill
        • DataSphereSkill
        • DateTimeSkill
        • GoogleMapsSkill
        • InfoGathererSkill
        • JokeSkill
        • MathSkill
        • McpGatewaySkill
        • NativeVectorSearchSkill
        • PlayBackgroundFileSkill
        • SpiderSkill
        • SwmlTransferSkill
        • WeatherApiSkill
        • WebSearchSkill
        • WikipediaSearchSkill
      • SwaigFunction
      • SwmlBuilder
      • SWMLService
    • RELAY
      • Overview
      • Actions
      • Call
      • Constants
      • Events
      • Message
      • RelayClient
      • RelayError
    • REST Client
      • Overview
      • Addresses
      • Calling
      • ChatResource
      • Compat
      • Datasphere
      • Fabric
      • ImportedNumbersResource
      • Logs
      • LookupResource
      • MFA
      • Number Groups
      • Phone Numbers
      • Project
      • PubSubResource
      • Queues
      • Recordings
      • Registry
      • RestClient
      • RestError
      • Short Codes
      • SIP Profile
      • Verified Callers
      • Video
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • questions
  • prefix
  • completion_message
  • Example
AgentsSkills

InfoGathererSkill

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

JokeSkill

Next
Built with

Collect answers to a configured list of questions. The skill registers a start_questions tool and a submit_answer tool; the agent advances through the question list and reports completion when every question is answered.

Fails closed during setup() when questions is missing or invalid.

Class: InfoGathererSkill

Tools: start_questions, submit_answer (names are prefixed when prefix is set)

Env vars: None

Multi-instance: yes

questions
QuestionDefinition[]Required

Ordered list of questions to ask. Each question has:

  • key_name (string, required) — key used to store the caller’s answer.
  • question_text (string, required) — the question to ask.
  • confirm (boolean) — when true, the agent asks the caller to confirm the answer before moving on.
  • prompt_add (string) — optional extra prompt text appended while this question is active.
prefix
string

Optional prefix for tool names and the global-data namespace. When set, tools are named <prefix>_start_questions / <prefix>_submit_answer and state is stored under skill:<prefix>. Required when loading multiple InfoGathererSkill instances on the same agent.

completion_message
string

Message returned after every question has been answered. Defaults to a generic completion message.

Example

1import { AgentBase, InfoGathererSkill } from '@signalwire/sdk';
2
3const agent = new AgentBase({ name: 'intake', route: '/intake' });
4agent.setPromptText('Collect contact information for follow-up.');
5
6await agent.addSkill(new InfoGathererSkill({
7 questions: [
8 { key_name: 'full_name', question_text: 'What is your full name?' },
9 { key_name: 'email', question_text: 'What is your email address?', confirm: true },
10 { key_name: 'phone', question_text: 'What is your phone number?' },
11 ],
12 completion_message: 'Thanks — we will be in touch shortly.',
13}));
14
15agent.run();