Expand description
PostgreSQL memory service implementation with pgvector.
Provides PostgresMemoryService, a MemoryService backed by PostgreSQL
with pgvector cosine similarity search and tsvector keyword fallback.
§High-dimensional embeddings (>2000 dims)
pgvector limits both HNSW and IVFFlat indexes to 2000 dimensions on
the vector type. When the embedding provider reports more than 2000
dimensions (e.g. Gemini embedding-001 at 3072), the service
automatically uses halfvec expression indexing — storing full-precision
vector(N) data but indexing and querying via halfvec(N) casts.
halfvec supports HNSW up to 4000 dimensions with negligible recall
loss and 50% storage savings on the index.
Structs§
- Postgres
Memory Service - PostgreSQL-backed memory service with optional vector search.
- Postgres
Memory Service Builder - Builder for
PostgresMemoryServicewith configurable vector index.
Enums§
- Vector
Index Type - pgvector index algorithm for the embedding column.