Agents

Search

Vector search and knowledge base capabilities for SignalWire AI agents
View as MarkdownOpen in Claude

The Search module provides local vector search capabilities for building knowledge bases that power SignalWire AI agents. It supports hybrid search combining vector similarity with keyword matching, multiple document formats, configurable chunking strategies, and both SQLite and PostgreSQL (pgvector) storage backends.

The search module requires additional dependencies not included in the base SDK install. Choose the install level that matches your use case:

$pip install signalwire[search] # Basic search (~500MB)
$pip install signalwire[search-full] # + Document processing (~600MB)
$pip install signalwire[search-nlp] # + Advanced NLP features (~600MB)
$pip install signalwire[search-all] # All search features (~700MB)

For querying pre-built .swsearch indexes only (smallest footprint):

$pip install signalwire[search-queryonly] # ~400MB

All classes and functions are imported from the signalwire.search namespace:

1from signalwire.search import (
2 SearchEngine,
3 DocumentProcessor,
4 IndexBuilder,
5 SearchService,
6 SearchIndexMigrator,
7 preprocess_query,
8 preprocess_document_content,
9 resolve_model_alias,
10 MODEL_ALIASES,
11 DEFAULT_MODEL,
12)

If the required dependencies are not installed, importing these names will raise an ImportError with a message indicating which packages are missing.

The sw-search CLI tool provides command-line access to index building, validation, and querying. See the sw-search CLI reference for details.

Learn More