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
        • ConciergeAgent
        • FAQBotAgent
        • InfoGathererAgent
        • ReceptionistAgent
        • SurveyAgent
      • SkillBase
      • SkillManager
      • SkillRegistry
      • Skills
      • 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
  • Extending Prefabs
Agents

Prefabs

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

ConciergeAgent

Next
Built with

Prefabs are ready-to-use agent classes that implement common conversational patterns. Each prefab extends AgentBase, so you can customize them with additional prompt sections, tools, skills, and languages. Use them directly for rapid prototyping or subclass them for production use.

1import {
2 ConciergeAgent,
3 FAQBotAgent,
4 InfoGathererAgent,
5 ReceptionistAgent,
6 SurveyAgent,
7} from '@signalwire/sdk';
PrefabPurposeBuilt-in Tools
ConciergeAgentVenue concierge with services, amenities, and hourscheck_availability, get_directions
FAQBotAgentAnswer questions using keyword matchingsearch_faq, escalate (optional)
InfoGathererAgentCollect answers to a list of questionsstart_questions, submit_answer
ReceptionistAgentFront-desk check-in, directory, and transferscollect_caller_info, transfer_call, check_in_visitor (optional)
SurveyAgentConduct surveys with branching and scoringvalidate_response, log_response, answer_question, get_current_question, get_survey_progress

Each prefab also has a corresponding factory function (e.g., createConciergeAgent()) that creates and returns a configured instance.

All prefabs can be extended by subclassing. Add custom tools with defineTool(), extra prompt sections with promptAddSection(), and skills with addSkill().

ConciergeAgent

Multi-department routing with knowledge base, hours of operation, and call transfer.

FAQBotAgent

Answer questions using keyword matching with optional escalation.

InfoGathererAgent

Collect named fields from a caller with validation and completion callbacks.

ReceptionistAgent

Front-desk check-in, directory lookup, and call transfers.

SurveyAgent

Conduct surveys with branching, scoring, and multiple question types.


Extending Prefabs

All prefabs inherit from AgentBase, so you can add custom tools, prompt sections, and skills:

1import { FAQBotAgent } from '@signalwire/sdk';
2import { FunctionResult } from '@signalwire/sdk';
3
4class MyFAQBot extends FAQBotAgent {
5 protected override defineTools(): void {
6 super.defineTools();
7
8 this.defineTool({
9 name: 'escalate_to_human',
10 description: 'Escalate to a human agent',
11 parameters: { type: 'object', properties: {} },
12 handler: () => {
13 const result = new FunctionResult('Transferring you to an agent now.');
14 result.connect('+15551234567');
15 return result;
16 },
17 });
18 }
19}
20
21const agent = new MyFAQBot({
22 faqs: [
23 { question: 'What is your return policy?', answer: '30-day returns.' },
24 ],
25});
26
27agent.promptAddSection('Brand', { body: 'You represent Acme Corp.' });
28agent.addSkill('datetime');
29
30agent.serve();