Agents SDK
What You’ll Learn
This chapter walks you through the complete setup process:
- Introduction - Understand what the SDK does and key concepts
- Installation - Install the SDK and verify it works
- Quick Start - Build your first agent in under 5 minutes
- Development Environment - Set up a professional development workflow
- Exposing Your Agent - Make your agent accessible to SignalWire using ngrok
Prerequisites
Before starting, ensure you have:
- Python 3.8 or higher installed on your system
- pip (Python package manager)
- A terminal/command line interface
- A text editor or IDE (VS Code, PyCharm, etc.)
- (Optional) A SignalWire account for testing with real phone calls
Time to Complete
By the End of This Chapter
You will have:
- A working voice AI agent
- Accessible via public URL
- Ready to connect to SignalWire phone numbers

What is the SignalWire Agents SDK?
The SignalWire Agents SDK lets you create voice AI agents - intelligent phone-based assistants that can:
- Answer incoming phone calls automatically
- Have natural conversations using AI (GPT-4, Claude, etc.)
- Execute custom functions (check databases, call APIs, etc.)
- Transfer calls, play audio, and manage complex call flows
- Scale from development to production seamlessly
How It Works

The flow:
- A caller dials your SignalWire phone number
- SignalWire requests instructions from your agent (via HTTP)
- Your agent returns SWML (SignalWire Markup Language) - a JSON document describing how to handle the call
- SignalWire’s AI talks to the caller based on your configuration
- When the AI needs to perform actions, it calls your SWAIG functions (webhooks)
- Your functions return results, and the AI continues the conversation
Key Concepts
Agent
An Agent is your voice AI application. It’s a Python class that:
- Defines the AI’s personality and behavior (via prompts)
- Provides functions the AI can call (SWAIG functions)
- Configures voice, language, and AI parameters
- Runs as a web server that responds to SignalWire requests
SWML (SignalWire Markup Language)
SWML is a JSON format that tells SignalWire how to handle calls. Your agent generates SWML automatically - you don’t write it by hand.
SWAIG Functions
SWAIG (SignalWire AI Gateway) functions are tools your AI can use during a conversation. When a caller asks something that requires action, the AI calls your function.
Skills
Skills are reusable plugins that add capabilities to your agent. The SDK includes built-in skills for common tasks:
datetime- Get current time and dateweb_search- Search the webweather_api- Get weather informationmath- Perform calculations
What You Can Build
The SDK includes prefab agents for common scenarios (InfoGatherer, FAQBot, Survey, Receptionist) that you can customize or use as starting points.
SDK Features
Minimal Example
Here’s the simplest possible agent:
This agent:
- Starts a web server on port 3000
- Returns SWML that configures an AI assistant
- Uses the default voice and language settings
- Has no custom functions (just conversation)
Next Steps
Now that you understand what the SDK does, let’s install it and build something real.