Skip to main content Switch to mobile version signalwire-sdk 3.17.1 SignalWire SDK for AI voice agents, live call control (RELAY) and REST. Run sw-pydocs for its documentation.
pip install signalwire-sdk==3.17.1 Copy PIP instructions
Build AI voice agents, control live calls over WebSocket, and manage every SignalWire resource over REST, all from one package.
Documentation · Report an Issue · PyPI
Install the SDK from PyPI:
pip install signalwire-sdk The package installs its own documentation. sw-pydocs prints a map of the SDK for the installed version, with the docs, examples and tutorials on disk, and sw-pydocs api
sw-pydocs # the map: what the SDK does and where to start sw-pydocs agents # one topic: concepts, files to read, examples, API sw-pydocs api AgentBase # a signature, docstring and members AI Agents
Each agent is a self-contained microservice that generates SWML (SignalWire Markup Language) and handles SWAIG (SignalWire AI Gateway) tool calls. The SignalWire platform runs the entire AI pipeline (STT, LLM, TTS), and your agent defines the behavior.
from signalwire import AgentBase from signalwire.core.function_result import FunctionResult class MyAgent(AgentBase): def __init__(self): super().__init__(name="my-agent", route="/agent") self.add_language(name="English", code="en-US", voice="inworld.Mark") self.prompt_add_section("Role", body="You are a helpful assistant.") @AgentBase.tool(name="get_time") def get_time(self): """Get the current time""" from datetime import datetime return FunctionResult(f"The time is {datetime.now().strftime('%H:%M:%S')}") if __name__ == "__main__": agent = MyAgent() agent.run() swaig-test checks the agent locally, without running a server:
swaig-test my_agent.py --list-tools swaig-test my_agent.py --dump-swml swaig-test my_agent.py --exec get_time Agent Features
An agent built on AgentBase gets these features:
Prompt Object Model (POM): structured prompt composition with prompt_add_section()
SWAIG tools: functions defined with @AgentBase.tool() that the AI calls mid-conversation, with native access to the call's media stack
Skills system: capabilities added in one line, such as agent.add_skill("datetime")
Contexts and steps: structured multi-step workflows with navigation control
DataMap tools: tools that run on SignalWire's servers, calling REST APIs without your own webhook
Dynamic configuration: per-request agent customization for multi-tenant deployments
Call flow control: pre-answer, post-answer, and post-AI verb insertion
Prefab agents: ready-to-use archetypes (InfoGatherer, Survey, FAQ, Receptionist, Concierge)
Multi-agent hosting: multiple agents on a single server with AgentServer
Local search: offline document search with vector similarity and keyword matching
SIP routing: SIP calls routed to agents by username
Session state: persistent conversation state with global data and post-prompt summaries
Security: auto-generated basic auth, per-call tool tokens, webhook signature validation, and TLS support
Serverless: automatic detection of Lambda, CGI, Google Cloud Functions, and Azure Functions
The examples/ directory contains 50+ working examples:
See examples/README.md for the full list organized by category.
Real-time call control and messaging over WebSocket. The RELAY client connects to SignalWire via the Blade protocol and gives you imperative, async control over live phone calls and SMS/MMS.
from signalwire.relay import RelayClient client = RelayClient( project="...", token="...", host="example.signalwire.com", contexts=["default"] ) @client.on_call async def handle(call): await call.answer() action = await call.play([{"type": "tts", "params": {"text": "Welcome!"}}]) await action.wait() await call.hangup() client.run() The RELAY client provides:
Calling methods for play, record, collect, detect, tap, stream, AI, conferencing, and more
SMS/MMS messaging with delivery tracking
Action objects with wait(), stop(), pause(), resume()
Auto-reconnect with exponential backoff
See the RELAY documentation for the full guide, API reference, and examples.
Synchronous REST client for managing SignalWire resources and controlling calls over HTTP. No WebSocket required.
from signalwire.rest import RestClient client = RestClient(project="...", token="...", host="example.signalwire.com") client.fabric.ai_agents.create(name="Support Bot", prompt={"text": "You are helpful."}) client.calling.play(call_id, play=[{"type": "tts", "params": {"text": "Hello!"}}]) client.phone_numbers.search(areacode="512") client.datasphere.documents.search(query_string="billing policy") The REST client provides:
20 namespaced API surfaces: Fabric (13 resource types), Calling (37 commands), Video, Datasphere, Phone Numbers, SIP, Queues, Recordings, and more
A shared requests.Session for connection pooling
Dict returns: raw JSON, with no wrapper objects
See the REST documentation for the full guide, API reference, and examples.
The core package covers agents, RELAY and REST. The search extras add local document search; install the one that fits your needs:
# Core SDK (agents, RELAY, REST) pip install signalwire-sdk # With search (pick one based on your needs) pip install "signalwire-sdk[search-queryonly]" # Query pre-built .swsearch files (~400MB) pip install "signalwire-sdk[search]" # Build + query search indexes (~500MB) pip install "signalwire-sdk[search-full]" # + PDF, DOCX, Excel, HTML processing (~600MB) pip install "signalwire-sdk[search-all]" # All search features (~700MB) Documentation
Full reference documentation is available at signalwire.com/docs/server-sdks.
Guides are also available in the docs/ directory. They're installed with the package, with the examples and tutorials: sw-pydocs path prints where.
Agent Guide: creating agents, prompt configuration, dynamic setup
Architecture: SDK architecture and core concepts
SDK Features: feature overview, SDK vs raw SWML comparison
SWAIG Reference: function results, actions, post_data lifecycle
Contexts and Steps: structured workflows, navigation, gather mode
DataMap Guide: serverless API tools without webhooks
LLM Parameters: temperature, top_p, barge confidence tuning
SWML Service Guide: low-level construction of SWML documents
AI Chat Gateway: browser chat widgets without a token in the page
Skills and Extensions
Skills System: built-in skills and the modular framework
Third-Party Skills: creating and publishing custom skills
MCP Gateway: Model Context Protocol integration
Search Overview: architecture, installation, quick start
Search Indexing: building indexes, chunking, embeddings
Search Integration: agent integration, skills, HTTP API
Search Deployment: production deployment, pgvector, scaling
CLI Guide: swaig-test and sw-search command reference
Cloud Functions: Lambda, Cloud Functions, Azure deployment
Bedrock Agent: Amazon Bedrock integration
Configuration: environment variables, SSL, proxy setup
Security: authentication and security model
API Reference: complete class and method reference
Web Service: HTTP server and endpoint details
Skills Parameter Schema: skill parameter definitions
Multi-Agent Tutorial: 5-lesson guide from first agent to multi-agent systems
Fred Bot Tutorial: build a Wikipedia AI assistant step by step
Full-Guardrails Agent Tutorial: build a reservation line that keeps its rules in code, not in the prompt
Environment Variables
The SDK reads these environment variables:
Run the test suite from the repository root:
# Install dev dependencies pip install -r requirements-dev.txt # Run the test suite pytest # Run by category pytest -m unit pytest -m integration pytest -m skills # Coverage pytest --cov=signalwire --cov-report=html License
MIT. See LICENSE for details.
Released: Nov 27, 2026
Author: SignalWire Team
MIT View SPDX License List
search-queryonly search search-full search-nlp search-all pgvector mcp-gateway all
signalwire ai agents voice telephony swaig swml
Development Status 4 - Beta
Intended Audience Developers
Programming Language Python :: 3
Release files for signalwire-sdk 3.17.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 4.1 MB
Release files / signalwire_sdk-3.17.1.tar.gz
Release files / signalwire_sdk-3.17.1-py3-none-any.whl
Security for signalwire-sdk 3.17.1
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Nov 27, 2026 2 release files No provenance
Nov 26, 2026 2 release files No provenance
Nov 24, 2026 2 release files No provenance
Nov 23, 2026 2 release files No provenance
Nov 22, 2026 2 release files No provenance
Nov 21, 2026 2 release files No provenance
Nov 19, 2026 2 release files No provenance
Nov 18, 2026 2 release files No provenance
Nov 16, 2026 2 release files No provenance
Nov 15, 2026 2 release files No provenance
Nov 14, 2026 2 release files No provenance
Nov 13, 2026 2 release files No provenance
Nov 12, 2026 2 release files No provenance
Nov 9, 2026 2 release files No provenance
Oct 25, 2026 2 release files No provenance
Oct 22, 2026 2 release files No provenance
Oct 19, 2026 2 release files No provenance
Oct 14, 2026 2 release files No provenance
Oct 13, 2026 2 release files No provenance
Oct 5, 2026 2 release files No provenance
Oct 8, 2026 2 release files No provenance
Sep 29, 2026 2 release files No provenance
Sep 24, 2026 2 release files No provenance
Sep 18, 2026 2 release files No provenance
Sep 22, 2026 2 release files No provenance
Sep 7, 2026 2 release files No provenance
Aug 25, 2026 2 release files No provenance
Aug 13, 2026 2 release files No provenance
Aug 12, 2026 2 release files No provenance
Jul 27, 2026 2 release files No provenance
Jul 25, 2026 2 release files No provenance
Jul 23, 2026 2 release files No provenance
Jul 21, 2026 2 release files No provenance
Jul 20, 2026 2 release files No provenance
Jul 18, 2026 2 release files No provenance
Jul 17, 2026 2 release files No provenance
Jul 15, 2026 2 release files No provenance
Jul 14, 2026 2 release files No provenance
May 5, 2026 2 release files No provenance
Jul 11, 2026 2 release files No provenance
Jul 8, 2026 2 release files No provenance
Jun 29, 2026 2 release files No provenance
Jun 23, 2026 2 release files No provenance
Jun 22, 2026 2 release files No provenance
Jun 21, 2026 2 release files No provenance
Jun 18, 2026 2 release files No provenance
Jun 16, 2026 2 release files No provenance
Jun 13, 2026 2 release files No provenance
Jun 11, 2026 2 release files No provenance
Jun 5, 2026 2 release files No provenance
Jun 4, 2026 2 release files No provenance
Jun 2, 2026 2 release files No provenance
May 21, 2026 2 release files No provenance
May 20, 2026 2 release files No provenance
May 19, 2026 2 release files No provenance
May 7, 2026 2 release files No provenance
May 6, 2026 2 release files No provenance
Apr 12, 2026 2 release files No provenance
May 2, 2026 2 release files No provenance
Apr 30, 2026 2 release files No provenance
Apr 29, 2026 2 release files No provenance
Apr 28, 2026 2 release files No provenance
Apr 24, 2026 2 release files No provenance
Apr 22, 2026 2 release files No provenance
Apr 20, 2026 2 release files No provenance
Apr 16, 2026 2 release files No provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation
Deployed from fc0d8e6











