Installation

View as MarkdownOpen in Claude

System Requirements

LanguageRuntimePackage ManagerOS
Python3.10+pipLinux, macOS, Windows
TypeScriptNode.js 18+npmLinux, macOS, Windows

Basic Installation

$pip install signalwire

Verify Installation

$python -c "from signalwire import AgentBase; print('SDK installed successfully!')"

Installation Extras (Python)

The Python SDK provides optional extras for additional features:

Search Capabilities

$# Query-only (read .swsearch files) - ~400MB
$pip install "signalwire[search-queryonly]"
$
$# Build indexes + vector search - ~500MB
$pip install "signalwire[search]"
$
$# Full document processing (PDF, DOCX) - ~600MB
$pip install "signalwire[search-full]"
$
$# NLP features (spaCy) - ~600MB
$pip install "signalwire[search-nlp]"
$
$# All search features - ~700MB
$pip install "signalwire[search-all]"

Database Support

$# PostgreSQL vector database support
$pip install "signalwire[pgvector]"

Development Dependencies

$# All development tools (testing, linting)
$pip install "signalwire[dev]"

Search extras and optional dependencies are available in all language SDKs. See each SDK’s repository for language-specific installation extras.

Installation from Source

For development or to get the latest changes:

$# Clone the repository
$git clone https://github.com/signalwire/signalwire-agents.git
$cd signalwire-agents
$
$# Create virtual environment
$python -m venv venv
$source venv/bin/activate # On Windows: venv\Scripts\activate
$
$# Install in development mode
$pip install -e .
$
$# Or with extras
$pip install -e ".[search,dev]"

Virtual Environment Setup

Always use a virtual environment to avoid conflicts:

$# Create virtual environment
$python -m venv venv
$
$# Activate (Linux/macOS)
$source venv/bin/activate
$
$# Activate (Windows Command Prompt)
$venv\Scripts\activate
$
$# Activate (Windows PowerShell)
$venv\Scripts\Activate.ps1
$
$# Install the SDK
$pip install signalwire
$
$# Verify activation (should show venv path)
$which python

Quick Verification Script

1#!/usr/bin/env python3
2"""Verify SignalWire Agents SDK installation."""
3
4def main():
5 print("Checking SignalWire Agents SDK installation...\n")
6
7 # Check core import
8 try:
9 from signalwire import AgentBase
10 print("[OK] Core SDK: AgentBase imported successfully")
11 except ImportError as e:
12 print(f"[FAIL] Core SDK: Failed to import AgentBase - {e}")
13 return False
14
15 # Check SWAIG function support
16 try:
17 from signalwire import FunctionResult
18 print("[OK] SWAIG: FunctionResult imported successfully")
19 except ImportError as e:
20 print(f"[FAIL] SWAIG: Failed to import FunctionResult - {e}")
21 return False
22
23 # Check prefabs
24 try:
25 from signalwire.prefabs import InfoGathererAgent
26 print("[OK] Prefabs: InfoGathererAgent imported successfully")
27 except ImportError as e:
28 print(f"[FAIL] Prefabs: Failed to import - {e}")
29
30 # Check search (optional)
31 try:
32 from signalwire.search import SearchEngine
33 print("[OK] Search: SearchEngine available")
34 except ImportError:
35 print("[SKIP] Search: Not installed (optional)")
36
37 print("\n" + "=" * 50)
38 print("Installation verification complete!")
39 print("=" * 50)
40 return True
41
42if __name__ == "__main__":
43 main()

Run it:

$python verify_install.py

Expected output:

Checking SignalWire Agents SDK installation...
[OK] Core SDK: AgentBase imported successfully
[OK] SWAIG: FunctionResult imported successfully
[OK] Prefabs: InfoGathererAgent imported successfully
[SKIP] Search: Not installed (optional)
==================================================
Installation verification complete!
==================================================

Troubleshooting

Common Issues

ProblemCauseSolution
ModuleNotFoundError: No module named 'signalwire'Package not installedRun pip install signalwire
pip: command not foundpip not in PATHUse python -m pip install signalwire
Permission errorsInstalling globally without sudoUse virtual environment or pip install --user
Old pip versionpip can’t resolve dependenciesRun pip install --upgrade pip
Conflicts with other packagesDependency version mismatchUse a fresh virtual environment

Python Version Check

Ensure you have Python 3.10+:

$python --version
$# or
$python3 --version

If you have multiple Python versions:

$# Use specific version
$python3.10 -m venv venv
$source venv/bin/activate
$pip install signalwire

Upgrade Existing Installation

$pip install --upgrade signalwire

Clean Reinstall

$pip uninstall signalwire
$pip cache purge
$pip install signalwire

CLI Tools

The SDK includes command-line tools:

ToolPurpose
swaig-testTest agents and functions locally
sw-searchBuild and query search indexes
sw-agent-initCreate new agent projects

Verify CLI tools are available:

$swaig-test --help
$sw-agent-init --help

What Gets Installed

The SDK installs these core dependencies:

PackagePurpose
fastapiWeb framework for serving SWML
uvicornASGI server for running the agent
pydanticData validation and settings
structlogStructured logging
requestsHTTP client for API calls