SignalWire Agents SDK for Python
SignalWire was founded on one idea: Programmable Unified Communications (PUC) is the future. It’s not enough to just patch together various APIs for calling, messaging, and AI. We believe every developer should have the ability to build full-scale, intelligent communication workflows that adapt in real time.
That vision is pushed further with the SignalWire Agents SDK, a powerful Python framework that lets you build AI agents and control SignalWire’s telephony engine programmatically. With the Agents SDK, developers can define SIP routing logic, build multi-agent voice systems, run real-time call transfers, preserve context across states, and integrate external APIs, all from Python, no webhooks required.
What is the Agents SDK?
The SignalWire Agents SDK is a Python framework for building AI agents that can talk, listen, understand, and even modify the phone system mid-call in real time. Agents are stateless by default and deploy instantly to any serverless backend, with built-in support for custom state managers when needed.
Each agent includes a modular prompting framework, a declarative skill system, and a CLI testing suite that makes local development as fast as production deployment.
The SDK natively controls the SignalWire Markup Language (SWML) that defines how calls are routed, spoken, recorded, and more.
Agents as microservices
Every agent you build with the SDK is a complete, self-contained microservice. It's simultaneously:
A web application with HTTP endpoints
An AI persona with defined capabilities
A communication endpoint that handles voice, video, and messaging
A scalable service ready for production deployment
Stateless by default
All AI agents can persist conversation state across steps, and can even track it across calls if needed. By default, agents do not maintain persistent state, making them highly scalable and suitable for microservice deployments. However, when state management is needed, the platform provides built-in mechanisms through the SignalWire AI Gateway (SWAIG).
Serverless API integration
Define functions that run on SignalWire's infrastructure, not your server. Instead of creating webhook endpoints, describe the API call and response processing using JSON configuration that gets executed serverlessly.
This means you can integrate external APIs without standing up any servers or managing credentials. The SDK handles authentication, retries, error cases, and response processing. You define what you want; we handle how it works.
Building with the Agents SDK
With support for multiple agents on a single server, skills you can plug in with one line of code, and context-driven workflows, the SDK can scale from a single bot to an enterprise-wide AI voice system. Let’s walk through some highlights.
Skills system
Skills are modular, reusable components that can be easily added to any agent and configured with parameters, unlocking transactional and knowledge-base scenarios out-of-the-box. Add capabilities like web search, math, or datetime parsing with one line.
agent.add_skill("web_search",)
agent.add_skill("math")
agent.add_skill("datetime")Prefab agents
Prebuilt agents are available for use cases like onboarding, support, surveys, and other common scenarios. Custom prefabs can be created directly within your project or packaged as reusable libraries.
Use the custom prefab:
Multi-agent support
The Agents SDK makes true multi-agent orchestration a first-class feature.
You can deploy multiple specialized agents on a single server, define call flows between them, and transfer context seamlessly as users move between roles or tasks. Agents can also maintain chat and call history across sessions.
Alternatively, build a “meta-agent” that dynamically delegates to others. You can even rewrite output before TTS using dynamic config callbacks, enabling silent handoffs and more polished transitions.
Prompt Object Model (POM)
Your prompts are structured objects including sections, goals, instructions, and more. This helps maintain consistent tone and structure across AI interactions.
The SDK provides optional wrapper methods to make this even simpler. These convenience methods call prompt_add_section() internally with the appropriate section titles.
Search stack
For document search, you can install vector and keyword search layers. For complete search functionalities:
pip install signalwire-agents[search-all]
With this, your agent can query PDFs, docs, and web pages entirely offline, with no third-party APIs required.
Get started with the Agents SDK
SignalWire's platform was built to give developers complete, programmable access to unified communications. Now your logic, routing, tools, and speech behavior live in one place: your Python code.
Ready to see what you can build? Sign up for an account and join our developer community on Discord.