***

title: Installation
description: Install the SignalWire SDK for your language and verify everything works correctly.
slug: /guides/installation
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

## System Requirements

| Language   | Runtime     | Package Manager | OS                    |
| ---------- | ----------- | --------------- | --------------------- |
| Python     | 3.10+       | pip             | Linux, macOS, Windows |
| TypeScript | Node.js 18+ | npm             | Linux, macOS, Windows |

## Basic Installation

<Tabs>
  <Tab title="Python">
    ```bash
    pip install signalwire
    ```
  </Tab>

  <Tab title="TypeScript">
    ```bash
    npm install signalwire-agents
    ```
  </Tab>
</Tabs>

## Verify Installation

<Tabs>
  <Tab title="Python">
    ```bash
    python -c "from signalwire import AgentBase; print('SDK installed successfully!')"
    ```
  </Tab>

  <Tab title="TypeScript">
    ```bash
    node -e "const { AgentBase } = require('signalwire-agents'); console.log('SDK installed successfully!')"
    ```
  </Tab>
</Tabs>

## Installation Extras (Python)

The Python SDK provides optional extras for additional features:

### Search Capabilities

```bash
# 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

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

### Development Dependencies

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

<Note>
  Search extras and optional dependencies are available in all language SDKs. See each SDK's repository for language-specific installation extras.
</Note>

## Installation from Source

For development or to get the latest changes:

```bash
# 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:

```bash
# 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

```python
#!/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:

```bash
python verify_install.py
```

Expected output:

```text
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`                    |
| `pip: command not found`                            | pip not in PATH                  | Use `python -m pip install signalwire`          |
| 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+:

```bash
python --version
# or
python3 --version
```

If you have multiple Python versions:

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

### Upgrade Existing Installation

```bash
pip install --upgrade signalwire
```

### Clean Reinstall

```bash
pip uninstall signalwire
pip cache purge
pip install signalwire
```

## CLI 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:

```bash
swaig-test --help
sw-agent-init --help
```

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