Skip to main content

Vector Stores

Vector stores hold document embeddings and support similarity search. Agentium provides four implementations. Choose based on your scale, infrastructure, and persistence needs.

VectorStore Interface

Types


Implementations Comparison


InMemoryVectorStore

No dependencies. Data lost on restart. Ideal for development and tests.

PgVectorStore

Uses PostgreSQL with the pgvector extension. Requires pg and pgvector.
string
required
PostgreSQL connection string.
string
Not used directly—collections map to tables. Table names are sanitized from collection names.
number
Embedding dimensions. Defaults to embedder’s dimensions or 1536.

QdrantVectorStore

Uses Qdrant—a dedicated vector database. Requires @qdrant/js-client-rest.
string
default:"http://localhost:6333"
Qdrant server URL.
string
API key for Qdrant Cloud.
string
Collections are created on first upsert. Pass collection name to upsert/search.
number
Embedding dimensions. Defaults to embedder or 1536.

MongoDBVectorStore

Uses MongoDB. Supports Atlas Vector Search (when index exists) or local in-memory similarity. Requires mongodb.
string
required
MongoDB connection URI.
string
default:"agentium_vectors"
Database name.
string
Collections are created on first upsert.
string
default:"vector_index"
Atlas Search index name for $vectorSearch. Must be pre-created for Atlas.
number
Embedding dimensions.

EmbeddingProvider

All vector stores accept an optional EmbeddingProvider to compute embeddings when documents don’t include them. See Embeddings for OpenAI and Google providers.