Skip to content

Installation

For AI agents: a documentation index is available at the root level at /llms.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.

System Requirements

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

Basic Installation

Python
TypeScript
pip install signalwire-sdk

Verify Installation

Python
TypeScript
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
<Badge type="tip" text="Fresh" />
pip install "signalwire-sdk[search-queryonly]"

# Build indexes + vector search - ~500MB
pip install "signalwire-sdk[search]"

# Full document processing (PDF, DOCX) - ~600MB
pip install "signalwire-sdk[search-full]"

# NLP features (spaCy) - ~600MB
pip install "signalwire-sdk[search-nlp]"

# All search features - ~700MB
pip install "signalwire-sdk[search-all]"

Database Support

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

Development Dependencies

# All development tools (testing, linting)
pip install "signalwire-sdk[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-python.git
cd signalwire-python

# 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-sdk

# Verify activation (should show venv path)
which python

Quick Verification Script

#!/usr/bin/env python3
"""Verify SignalWire Agents SDK installation."""

def main():
    print("Checking SignalWire Agents SDK installation...\n")

    # Check core import
    try:
        from signalwire import AgentBase
        print("[OK] Core SDK: AgentBase imported successfully")
    except ImportError as e:
        print(f"[FAIL] Core SDK: Failed to import AgentBase - {e}")
        return False

    # Check SWAIG function support
    try:
        from signalwire import FunctionResult
        print("[OK] SWAIG: FunctionResult imported successfully")
    except ImportError as e:
        print(f"[FAIL] SWAIG: Failed to import FunctionResult - {e}")
        return False

    # Check prefabs
    try:
        from signalwire.prefabs import InfoGathererAgent
        print("[OK] Prefabs: InfoGathererAgent imported successfully")
    except ImportError as e:
        print(f"[FAIL] Prefabs: Failed to import - {e}")

    # Check search (optional)
    try:
        from signalwire.search import SearchEngine
        print("[OK] Search: SearchEngine available")
    except ImportError:
        print("[SKIP] Search: Not installed (optional)")

    print("\n" + "=" * 50)
    print("Installation verification complete!")
    print("=" * 50)
    return True

if __name__ == "__main__":
    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-sdk
pip: command not foundpip not in PATHUse python -m pip install signalwire-sdk
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-sdk

Upgrade Existing Installation

pip install --upgrade signalwire-sdk

Clean Reinstall

pip uninstall signalwire-sdk
pip cache purge
pip install signalwire-sdk

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

SignalWire Developer Documentation