Agents

CLI Tools

View as MarkdownOpen in Claude

The SignalWire Agents SDK ships with command-line tools for local development, testing, knowledge base management, project scaffolding, and deployment. All CLI tools are installed automatically with the SDK package and available on your PATH after installation.

$pip install signalwire

Available Tools

CommandPurpose
swaig-testTest SWAIG functions and generate SWML output locally
sw-searchBuild, search, and validate vector search indexes
sw-agent-initScaffold new agent projects with templates
sw-agent-dokkuDeploy agents to Dokku hosting
mcp-gatewayBridge MCP servers to SWAIG functions

Common Patterns

Local Development Workflow

$# 1. Create a new project
$sw-agent-init my-agent
$
$# 2. Inspect the generated SWML
$swaig-test agents/main_agent.py --dump-swml
$
$# 3. List available tools
$swaig-test agents/main_agent.py --list-tools
$
$# 4. Test a specific function
$swaig-test agents/main_agent.py --exec get_info --topic "SignalWire"

Building a Knowledge Base

$# Build a search index from documentation
$sw-search ./docs --output knowledge.swsearch
$
$# Verify the index
$sw-search validate knowledge.swsearch
$
$# Test search queries
$sw-search search knowledge.swsearch "how to create an agent"

Deployment

$# Deploy to Dokku
$sw-agent-dokku init my-agent --host dokku.example.com
$sw-agent-dokku deploy

Installation Extras

Some CLI tools require optional dependencies:

ExtraInstall CommandRequired For
searchpip install "signalwire[search]"sw-search build and query
search-fullpip install "signalwire[search-full]"PDF and DOCX processing
search-nlppip install "signalwire[search-nlp]"Advanced NLP features (spaCy)
search-queryonlypip install "signalwire[search-queryonly]"Query-only mode (smaller install)
pgvectorpip install "signalwire[pgvector]"PostgreSQL vector storage