Valkey Vector Store
Valkey is an open source (BSD) high-performance key/value datastore that supports a variety of workloads and rich datastructures including vector search.Installation
Usage
Parameters
Here are the parameters available for configuring Valkey:| Parameter | Description | Default Value |
|---|---|---|
collection_name | The name of the collection to store the vectors | mem0 |
valkey_url | Connection URL for the Valkey server | valkey://localhost:6379 |
embedding_model_dims | Dimensions of the embedding model | 1536 |
index_type | Vector index algorithm (hnsw or flat) | hnsw |
hnsw_m | Number of bi-directional links for HNSW | 16 |
hnsw_ef_construction | Size of dynamic candidate list for HNSW | 200 |
hnsw_ef_runtime | Size of dynamic candidate list for search | 10 |
cluster_mode | Enable cluster mode for Valkey cluster (CME) deployments | false |
distance_metric | Distance metric for vector similarity | cosine |
Cluster Mode
To use Valkey with cluster mode enabled (CME), setcluster_mode to true:
ValkeyCluster instead of the standalone client, which handles MOVED/ASK redirections automatically. Search queries are coordinated across all shards by the valkey-search module’s built-in coordinator. See the valkey-search documentation for details on cluster mode behavior.