Interface SqlVectorStoreConfig

Configuration for SQL-backed vector store.

Interface

SqlVectorStoreConfig

interface SqlVectorStoreConfig {
    id: string;
    customProps?: Record<string, any>;
    type: "sql";
    storage?: StorageResolutionOptions;
    adapter?: StorageAdapter;
    defaultEmbeddingDimension?: number;
    similarityMetric?: "cosine" | "euclidean" | "dotproduct";
    enableFullTextSearch?: boolean;
    tablePrefix?: string;
    pipeline?: TextProcessingPipeline;
    hnswThreshold?: number;
    hnswDimensions?: number;
    hnswSidecarFactory?: (() => HnswIndexSidecar);
}

Hierarchy (view full)

Properties

id: string

A unique identifier for this specific provider instance (e.g., "pinecone-main-prod", "weaviate-dev-local"). This ID is used by the VectorStoreManager to retrieve this provider.

customProps?: Record<string, any>

Any other custom properties or configurations specific to this provider instance not covered by standard fields.

type: "sql"

Must be 'sql' for this provider

storage?: StorageResolutionOptions

Storage adapter configuration. Passed directly to resolveStorageAdapter().

adapter?: StorageAdapter

Pre-initialized storage adapter. If provided, storage config is ignored.

defaultEmbeddingDimension?: number

Default embedding dimension for new collections.

similarityMetric?: "cosine" | "euclidean" | "dotproduct"

Default similarity metric.

Default

'cosine'
enableFullTextSearch?: boolean

Enable full-text search index provisioning. Creates FTS5 virtual tables for SQLite or tsvector columns for PostgreSQL.

Default

true
tablePrefix?: string

Table name prefix for all vector store tables.

Default

'agentos_rag_'
pipeline?: TextProcessingPipeline

Optional text processing pipeline for hybrid search tokenization. Replaces the built-in regex tokenizer with configurable stemming, lemmatization, and stop word handling.

See

createRagPipeline from nlp

hnswThreshold?: number

Document count threshold before HNSW sidecar activates. Below this count, brute-force cosine similarity is used. Set to 0 to disable HNSW. Set to Infinity to always use brute-force.

Default

1000
hnswDimensions?: number

Embedding dimensions for the HNSW sidecar index.

Default

1536
hnswSidecarFactory?: (() => HnswIndexSidecar)

Optional custom HNSW sidecar factory. Primarily useful for tests or advanced hosts that need to provide their own ANN sidecar implementation.

Type declaration

    • (): HnswIndexSidecar
    • Returns HnswIndexSidecar