Skip to content

Weaviate vector store

Weaviate is a vector search engine with a native BM25 index, selected via VECTOR_STORE_PROVIDER=weaviate.

Enable it

bash
VECTOR_STORE_PROVIDER=weaviate
WEAVIATE_URL=http://localhost:8080
WEAVIATE_API_KEY=your-weaviate-api-key

Install the client: pip install weaviate-client.

Configuration

VariableDefaultDescription
VECTOR_STORE_PROVIDERpgvectorSet to weaviate to use this store.
WEAVIATE_URLhttp://localhost:8080URL of the running or hosted Weaviate.
WEAVIATE_API_KEY(none)Optional. When set, the store connects to Weaviate Cloud with it.

Notes

  • Unit-tested against a mocked Weaviate client, not integration-tested against a live instance. Smoke-test before production use.
  • The collection is created on first use with the configured dimension, vectorizer none (embeddings come from this app), and the cosine distance metric.
  • keyword_search is native here: Weaviate's BM25 index over the data property backs it, so it is not degraded, though BM25 scores differ from Postgres ts_rank.
  • Object ids must be UUIDs (Weaviate's key type). The engine generates uuid4 ids, so this holds; a non-UUID id would be rejected. Collection names are capitalized to satisfy Weaviate (e.g. memoryg_memories becomes Memoryg_memories).
  • list_scope_values scans up to a capped limit and de-duplicates client-side (no SQL DISTINCT), and get/list return valid_to = None for a live row rather than an infinity timestamp.

The memory layer for AI agents.