Search documents using vector similarity and keyword matching. Supports three modes:
documents array in config; the skill
tokenizes and indexes at startup (TypeScript-specific fast path).index_file at a .swsearch index, or set
build_index: true and source_dir to index at startup.remote_url at a search server and optionally
name the index via index_name. Validated by the SSRF guard before each
request; health check uses a 5-second timeout.Class: NativeVectorSearchSkill
Tools: search_knowledge (default — tool_name override supported)
Env vars: None
Multi-instance: yes (distinguished by tool_name + index_file)
Custom tool name for this skill instance. Required when registering multiple instances on the same agent.
Path to a local .swsearch SQLite index file.
Whether to build the index from source files at startup.
Directory containing documents to index. Required when build_index is
true.
URL of a remote search server (network mode). Validated by the SSRF guard — private, loopback, and cloud-metadata endpoints are rejected.
Name of the index on a remote server. Only used with remote_url.
In-memory array of documents to index (TypeScript-specific). Each entry has
id (string), text (string), optional metadata (object), and optional
tags (string[]).
Number of search results to return (range 1-20).
Minimum similarity score for results (0.0 — no limit, 1.0 — exact match).
Manual keyword weight in the hybrid TF-IDF + keyword score
(range 0.0-1.0). Overrides the automatic default of 0.3.
Embedding model for remote/SQLite modes. Shortcuts: "mini" (fastest,
384 dims), "base" or "large" (768 dims). Full model names also accepted.
Tag filter applied to search queries. Only documents carrying at least one matching tag are returned.
Tags applied to every document at index-build time.
File extensions to include when building an index from source_dir.
Glob patterns excluded from index builds. Defaults include
**/node_modules/**, **/.git/**, **/dist/**, **/build/**.
Maximum total response size in characters (distributed across all results).
Message returned when no results match. Supports a {query} placeholder
that is substituted with the user’s query text.
Text prepended to the search response.
Text appended to the search response.
Optional callback to transform the final response. Receives
{ response, agent, query, results, args, count, skill } and must return a
string.
Description of the search tool presented to the AI.
Additional speech recognition hints for the tool.
NLP backend for query processing: "basic", "spacy", or "nltk".
Deprecated — use query_nlp_backend and index_nlp_backend instead.
NLP backend for query expansion: "basic", "spacy", or "nltk".
NLP backend for indexing: "basic", "spacy", or "nltk".
Storage backend for local database mode: "sqlite" or "pgvector". Ignored
when remote_url is set. SQLite and pgvector backends require native
Python-only dependencies; configurations written for the Python SDK remain
valid but the TypeScript SDK only exercises the in-memory (documents) and
remote (remote_url) paths.
PostgreSQL connection string. Required when backend="pgvector".
PostgreSQL collection name. Required when backend="pgvector".
Enable verbose logging during indexing and search.
Overwrite existing pgvector collection when building the index.