![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | lesson5_extending_agents.html | 2025-06-18 20:03 | 111K | |
![]() | lesson4_advanced_features.html | 2025-06-18 20:03 | 91K | |
![]() | lesson2_knowledge_bases.html | 2025-06-18 20:03 | 54K | |
![]() | lesson3_multi_agent_systems.html | 2025-06-18 20:03 | 54K | |
![]() | lesson1_first_agent.html | 2025-06-18 20:03 | 50K | |
![]() | README.html | 2025-06-18 20:03 | 33K | |
![]() | support_knowledge.html | 2025-06-18 20:03 | 30K | |
![]() | sales_knowledge.html | 2025-06-18 20:03 | 28K | |
Welcome to the comprehensive tutorial for building AI-powered voice agents using the SignalWire Agents SDK. This tutorial will take you from creating your first simple agent to building sophisticated multi-agent systems with knowledge base integration.
This tutorial covers everything you need to know to build production-ready AI voice agents:
Core Concepts:
AgentBase
Advanced Features:
Real-World Skills:
Before starting this tutorial, ensure you have:
Required:
Recommended:
This tutorial is organized into progressive lessons, each building on the previous:
Learn the fundamentals by building a simple sales agent named Morgan. You'll understand:
Enhance your agent with searchable knowledge using vector search. You'll learn:
Create a complete multi-agent system with routing and context sharing. You'll master:
Master advanced concepts for production deployment. Topics include:
Learn to add custom functionality and create sophisticated conversational flows:
# Clone the repository (if not already done)
git clone https://github.com/signalwire/signalwire-agents.git
cd signalwire-agents
# Install the base SDK
pip install -e .
# Or install with search capabilities
pip install -e .[search]
After completing Lesson 1, you can run your first agent:
# Run the simple sales agent
python tutorial/sales_agent.py
# The agent will be available at http://localhost:3000/
You can test your agent using curl:
curl -X POST http://localhost:3000/ \
-H "Content-Type: application/json" \
-d '{}'
Common Commands:
# Install with search support
pip install -e .[search]
# Build a search index
sw-search ./docs --output knowledge.swsearch
# Test SWAIG functions locally
swaig-test agent.py --list-tools
swaig-test agent.py --exec tool_name --param value
# Run with SSL enabled
SWML_SSL_ENABLED=true \
SWML_SSL_CERT_PATH=/path/to/cert.pem \
SWML_SSL_KEY_PATH=/path/to/key.pem \
SWML_DOMAIN=yourdomain.com \
python agent.py
Environment Variables:
Variable | Description | Default |
---|---|---|
SWML_SSL_ENABLED |
Enable HTTPS | false |
SWML_SSL_CERT_PATH |
Path to SSL certificate | None |
SWML_SSL_KEY_PATH |
Path to SSL private key | None |
SWML_DOMAIN |
Domain for SSL | None |
SWML_AUTH_USER |
Basic auth username | Auto-generated |
SWML_AUTH_PASS |
Basic auth password | Auto-generated |
PYTORCH_DISABLE_AVX512 |
Disable AVX512 for compatibility | 0 |
All code examples from this tutorial are available in this directory:
sales_agent.py
- Basic sales agent (Lesson 1)sales_agent_with_search.py
- Agent with knowledge base (Lesson 2)pc_builder.py
- Complete multi-agent system (Lesson 3)sales_knowledge.md
- Sales knowledge basesupport_knowledge.md
- Support knowledge baseCommon Issues:
Port already in use:
bash
# Change the port in your agent configuration
port=3001 # or any available port
Search module not found:
bash
# Install with search support
pip install -e .[search]
PyTorch compatibility issues:
bash
# Disable AVX512 instructions
export PYTORCH_DISABLE_AVX512=1
Resources:
Debugging Tips:
--verbose
flag for detailed loggingswaig-test
before deploymentcurl
to test SWML endpoints directlyAgent Development:
AgentBase
SwaigFunctionResult
Production Deployment:
Security:
Start with Lesson 1: Creating Your First Agent to begin your journey into building AI-powered voice agents with SignalWire!
This tutorial is part of the SignalWire Agents SDK. For the latest updates and more information, visit the official repository.