v0.15.0 — Vector Store Plugins & pgvector
Vector Store Plugins & pgvector
This release makes the VectorStore trait available to external plugin crates and ships the first vector store plugin: pgvector.
New Crate: daimon-plugin-pgvector
A pgvector-backed VectorStore for PostgreSQL RAG workloads.
PgVectorStore— implementsVectorStore(upsert, query, delete, count) usingtokio-postgreswithdeadpool-postgresconnection pooling- Distance metrics — Cosine (
<=>), L2 (<->), Inner Product (<#>) with matching HNSW operator classes - HNSW indexing — configurable
mandef_constructionparameters - Auto-migration — creates the
vectorextension, table, and HNSW index on first use (opt-out via builder) - Manual SQL —
migrationsmodule exportsCREATE_EXTENSION,create_table_sql(),create_hnsw_index_sql()for DIY schema management - Builder pattern —
PgVectorStoreBuilder::new(conn_str, dimensions)with.table(),.distance_metric(),.pool_size(),.hnsw_m(),.hnsw_ef_construction(),.auto_migrate()
Architecture: VectorStore in daimon-core
Document, ScoredDocument, VectorStore, ErasedVectorStore, and SharedVectorStore have been moved from the main daimon crate to daimon-core. This follows the same pattern as the TaskBroker refactor in v0.13.0, enabling plugin crates to implement VectorStore by depending only on the lightweight daimon-core. The main daimon crate re-exports everything — no breaking changes for existing users.
Quick Start
[dependencies]
daimon = { version = "0.15", features = ["pgvector", "openai"] }use daimon::prelude::*;
let store = PgVectorStoreBuilder::new("postgresql://user:pass@localhost/db", 1536)
.table("my_docs")
.distance_metric(DistanceMetric::Cosine)
.build()
.await?;
let kb = SimpleKnowledgeBase::new(embedding_model, store);
kb.ingest(vec![Document::new("relevant text")]).await?;
let results = kb.search("query", 5).await?;Full Changelog: v0.14.0...v0.15.0