The SignalWire Agents SDK provides several command-line tools to help with development, testing, and deployment.
Build local search indexes from document collections for use with the native vector search skill.
sw-search <source_dir> [options]
Arguments:
source_dir
- Directory containing documents to indexOptions:
--output FILE
- Output .swsearch file (default: <source_dir>.swsearch
)--chunk-size SIZE
- Chunk size in characters (default: 500)--chunk-overlap SIZE
- Overlap between chunks (default: 50)--file-types TYPES
- Comma-separated file extensions (default: md,txt)--exclude PATTERNS
- Comma-separated glob patterns to exclude--model MODEL
- Embedding model name (default: sentence-transformers/all-mpnet-base-v2)--tags TAGS
- Comma-separated tags to add to all chunks--verbose
- Show detailed progress information--validate
- Validate the created index after buildingSubcommands:
sw-search validate <index_file> [options]
Arguments:
index_file
- Path to .swsearch file to validateOptions:
--verbose
- Show detailed information about the indexsw-search search <index_file> <query> [options]
Arguments:
index_file
- Path to .swsearch file to searchquery
- Search query textOptions:
--count COUNT
- Number of results to return (default: 5)--distance-threshold FLOAT
- Minimum similarity score (default: 0.0)--tags TAGS
- Comma-separated tags to filter by--verbose
- Show detailed information--json
- Output results as JSON--no-content
- Hide content in results (show only metadata)Examples:
# Build from the comprehensive concepts guide
sw-search docs/signalwire_agents_concepts_guide.md --output concepts.swsearch
# Build from multiple sources
sw-search docs/signalwire_agents_concepts_guide.md examples README.md --output comprehensive.swsearch
# Validate an index
sw-search validate concepts.swsearch
# Search within an index
sw-search search concepts.swsearch "how to create an agent"
sw-search search concepts.swsearch "API reference" --count 3 --verbose
sw-search search concepts.swsearch "configuration" --tags documentation --json
# Traditional directory approach
sw-search docs --output docs.swsearch
For complete documentation on the search system, see Local Search System.
Test SignalWire AI Agent SWAIG functions and SWML generation locally.
swaig-test <agent_file> [function_name] [options]
Key Features:
Examples:
# List available agents
swaig-test examples/my_agent.py --list-agents
# List available functions
swaig-test examples/my_agent.py --list-tools
# Test SWML generation
swaig-test examples/my_agent.py --dump-swml
# Test a specific function
swaig-test examples/my_agent.py --exec my_function --param value
# Simulate serverless environment
swaig-test examples/my_agent.py --simulate-serverless lambda --dump-swml
For complete documentation, see CLI Testing Guide.
All CLI tools are included when you install the SignalWire Agents SDK:
pip install signalwire-agents
# For search functionality
pip install signalwire-agents[search]
# For full functionality
pip install signalwire-agents[search-all]
Each command provides help information:
# General help
sw-search --help
# SWAIG testing help
swaig-test --help