Duration 1.5 hours
Day 1 of 2

Learning Objectives

By the end of this module, students will be able to:

  • Explain what conversational AI is and its business applications
  • Describe the SignalWire platform and its capabilities
  • Identify the components of the AI Agents SDK
  • Trace the path of a voice call through an AI agent

Topics

1. What is Conversational AI? (20 min)

Definition

Conversational AI enables natural language interactions between humans and computers through voice or text. Unlike traditional IVR systems with rigid menus, conversational AI understands intent and responds dynamically.

Key Capabilities

  • Natural language understanding (NLU)
  • Context awareness across conversation turns
  • Dynamic response generation
  • Intent recognition and fulfillment
  • Multi-turn dialogue management

Business Applications

Industry Use Case Benefit
Healthcare Appointment scheduling 24/7 availability
Finance Account inquiries Reduced wait times
Retail Order status Scalable support
Hospitality Reservations Consistent experience
Support Ticket triage Agent efficiency

Discussion Questions

  1. What voice AI experiences have you had as a consumer?
  2. What made them good or frustrating?
  3. What opportunities exist in your organization?

2. SignalWire Platform Overview (25 min)

What is SignalWire?

SignalWire is a programmable unified communications (PUC) platform providing:

  • Programmable voice calls
  • SMS/MMS messaging
  • Video conferencing
  • AI-powered voice agents

Platform Components

┌─────────────────────────────────────────────────────────┐
│                   SignalWire Platform                   │
├─────────────────────────────────────────────────────────┤
│  Phone Numbers  │  SIP Trunking  │  Video Rooms         │
├─────────────────────────────────────────────────────────┤
│                    SWML Engine                          │
│         (SignalWire Markup Language)                    │
├─────────────────────────────────────────────────────────┤
│                    AI Gateway                           │
│     (LLM Integration, Speech Recognition, TTS)          │
├─────────────────────────────────────────────────────────┤
│                   Your Agent                            │
│          (SignalWire Agents SDK)                        │
└─────────────────────────────────────────────────────────┘

How It Works

  1. Inbound Call → Phone number receives call
  2. SWML Request → SignalWire requests instructions from your agent
  3. AI Conversation → Agent handles dialogue with caller
  4. Function Calls → Agent can perform actions (lookups, transfers)
  5. Call End → Summary and cleanup

Key Terminology

Term Definition
SWML SignalWire Markup Language - JSON documents that control call behavior
SWAIG SignalWire AI Gateway - enables AI function calling
Agent Your application that generates SWML and handles functions
Webhook HTTP endpoint SignalWire calls to get instructions

3. SDK Architecture (25 min)

The SignalWire Agents SDK

A Python framework for building voice AI agents without low-level protocol handling.

What the SDK Provides

  • AgentBase class - Foundation for all agents
  • SWML generation - Automatic document creation
  • SWAIG functions - Easy function definition
  • Skills system - Reusable capabilities
  • Deployment options - Multiple hosting environments

Architecture Diagram

┌─────────────────────────────────────────────────────────┐
│                      AgentBase                          │
├─────────────────────────────────────────────────────────┤
│  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐    │
│  │   Auth   │ │  Prompt  │ │   Tool   │ │  Skill   │    │
│  │  Mixin   │ │  Mixin   │ │  Mixin   │ │  Mixin   │    │
│  └──────────┘ └──────────┘ └──────────┘ └──────────┘    │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐    │
│  │   SWML   │ │    AI    │ │Serverless│ │  State   │    │
│  │  Mixin   │ │  Config  │ │  Mixin   │ │  Mixin   │    │
│  └──────────┘ └──────────┘ └──────────┘ └──────────┘    │
├─────────────────────────────────────────────────────────┤
│                    SWMLService                          │
│              (Base SWML generation)                     │
└─────────────────────────────────────────────────────────┘

Mixins Explained

Mixin Purpose
Auth HTTP authentication handling
Prompt Prompt Object Model management
Tool SWAIG function registration
Skill Plugin system for capabilities
SWML Document generation
AI Config LLM and voice parameters
Serverless Lambda/Cloud Functions support
State Per-call data persistence

CLI Tools

Tool Purpose
swaig-test Test agents locally without calls
sw-search Build knowledge base indexes
sw-agent-init Scaffold new projects

4. Call Flow Deep Dive (20 min)

Complete Request Lifecycle

    Caller                SignalWire              Your Agent
      │                       │                       │
      │   1. Dials number     │                       │
      │──────────────────────>│                       │
      │                       │                       │
      │                       │  2. POST /your-agent  │
      │                       │──────────────────────>│
      │                       │                       │
      │                       │  3. SWML Response     │
      │                       │<──────────────────────│
      │                       │                       │
      │  4. "Hello, how can   │                       │
      │      I help you?"     │                       │
      │<──────────────────────│                       │
      │                       │                       │
      │  5. "Check my order"  │                       │
      │──────────────────────>│                       │
      │                       │                       │
      │                       │  6. Function call     │
      │                       │──────────────────────>│
      │                       │                       │
      │                       │  7. Function result   │
      │                       │<──────────────────────│
      │                       │                       │
      │  8. "Your order is    │                       │
      │      on the way"      │                       │
      │<──────────────────────│                       │
      │                       │                       │

Five Phases of a Call

  1. Call Setup
    • Number receives call
    • SignalWire determines webhook URL
    • Prepares request with call metadata
  2. SWML Generation
    • Agent receives POST request
    • Builds SWML document
    • Returns AI configuration and functions
  3. AI Conversation
    • SignalWire processes SWML
    • LLM generates responses
    • Speech synthesis speaks to caller
    • Speech recognition captures input
  4. Function Execution
    • AI determines function needed
    • SignalWire calls agent’s SWAIG endpoint
    • Agent executes logic, returns result
    • AI incorporates result into conversation
  5. Call End
    • Caller hangs up or transfer completes
    • Optional post-prompt summary
    • Call data available for analytics

Key Takeaways

  1. Voice AI is not IVR - It’s dynamic, contextual conversation
  2. SignalWire handles the hard parts - Telephony, speech, LLM integration
  3. SDK simplifies development - Focus on logic, not protocols
  4. Agents are webhook servers - They respond to SignalWire requests
  5. Functions extend capabilities - Beyond conversation to action

Preparation for Lab 1.1

  • Ensure Python 3.10+ is installed
  • Have VS Code ready
  • SignalWire credentials available
  • ngrok installed and authenticated

Resources


Back to top

SignalWire AI Agents Certification Program