Appearance
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
| Language | Runtime | Package Manager | OS |
|---|---|---|---|
| Python | 3.10+ | pip | Linux, macOS, Windows |
| TypeScript | Node.js 18+ | npm | Linux, macOS, Windows |
Basic Installation
Python
TypeScript
pip install signalwire-sdkVerify 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 pythonQuick 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.pyExpected 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
| Problem | Cause | Solution |
|---|---|---|
ModuleNotFoundError: No module named 'signalwire' | Package not installed | Run pip install signalwire-sdk |
pip: command not found | pip not in PATH | Use python -m pip install signalwire-sdk |
| Permission errors | Installing globally without sudo | Use virtual environment or pip install --user |
| Old pip version | pip can’t resolve dependencies | Run pip install --upgrade pip |
| Conflicts with other packages | Dependency version mismatch | Use a fresh virtual environment |
Python Version Check
Ensure you have Python 3.10+:
python --version
# or
python3 --versionIf you have multiple Python versions:
# Use specific version
python3.10 -m venv venv
source venv/bin/activate
pip install signalwire-sdkUpgrade Existing Installation
pip install --upgrade signalwire-sdkClean Reinstall
pip uninstall signalwire-sdk
pip cache purge
pip install signalwire-sdkCLI Tools
The SDK includes command-line tools:
| Tool | Purpose |
|---|---|
swaig-test | Test agents and functions locally |
sw-search | Build and query search indexes |
sw-agent-init | Create new agent projects |
Verify CLI tools are available:
swaig-test --help
sw-agent-init --helpWhat Gets Installed
The SDK installs these core dependencies:
| Package | Purpose |
|---|---|
fastapi | Web framework for serving SWML |
uvicorn | ASGI server for running the agent |
pydantic | Data validation and settings |
structlog | Structured logging |
requests | HTTP client for API calls |
