SignalWire SDKs

Install the SDK and build your first application.
View as MarkdownOpen in Claude

Supported Languages

The SignalWire Server SDK is available in multiple languages. Select the variant that matches your development environment.

What You’ll Learn

This chapter walks you through the complete setup process:

  1. Installation - Install the SDK and verify it works
  2. Quick Start - Build your first agent in under 5 minutes
  3. Development Environment - Set up a professional development workflow
  4. Exposing Your Agent - Make your agent accessible to SignalWire using ngrok

Prerequisites

Before starting, ensure you have the following:

LanguageRequirementPackage Manager
Python3.10+pip
TypeScriptNode.js 18+npm

You’ll also need:

  • A terminal/command line interface
  • A text editor or IDE (VS Code, etc.)
  • (Optional) A SignalWire account for testing with real phone calls

Time to Complete

SectionTime
Installation5 min
Quick Start5 min
Dev Environment10 min
Exposing Agents10 min
Total~30 minutes

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
Getting Started Overview.
Getting Started Overview

What is the SignalWire SDK?

The SignalWire SDK lets you create voice AI agents - intelligent phone-based assistants that can:

  • Answer incoming phone calls automatically
  • Have natural conversations using AI
  • 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

High-Level Architecture.
High-Level Architecture

The flow:

  1. A caller dials your SignalWire phone number
  2. SignalWire requests instructions from your agent (via HTTP)
  3. Your agent returns SWML (SignalWire Markup Language) - a JSON document describing how to handle the call
  4. SignalWire’s AI talks to the caller based on your configuration
  5. When the AI needs to perform actions, it calls your SWAIG functions (webhooks)
  6. Your functions return results, and the AI continues the conversation

Key Concepts

Agent

An Agent is your voice AI application. It’s a 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
1from signalwire import AgentBase
2
3class MyAgent(AgentBase):
4 def __init__(self):
5 super().__init__(name="my-agent")
6 # Configure your agent here

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.

1{
2 "version": "1.0.0",
3 "sections": {
4 "main": [
5 {"answer": {}},
6 {"ai": {
7 "prompt": {"text": "You are a helpful assistant..."},
8 "SWAIG": {"functions": ["..."]}
9 }}
10 ]
11 }
12}

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.

1@agent.tool(description="Look up a customer by phone number")
2def lookup_customer(args, raw_data=None):
3 phone_number = args.get("phone_number", "")
4 customer = database.find(phone_number)
5 return FunctionResult(
6 f"Customer: {customer.name}, Account: {customer.id}"
7 )

Next Steps

Now that you understand the basics, let’s get your development environment set up:

  1. Installation - Install the SDK
  2. Quick Start - Build your first agent
  3. Development Environment - Professional setup
  4. Exposing Agents - Connect to SignalWire