feat: Add Valkey as a vector database option (using Valkey GLIDE)
Author: MatthiasHowellYoppCreated May 15, 2026Updated May 15, 2026
Summary
Add Valkey as a supported vector database in llmware, using the official Valkey GLIDE sync client (valkey-glide-sync).
Related discussion: #1296
Motivation
- Valkey is the open-source (BSD-3-Clause) successor to Redis, backed by the Linux Foundation
- The valkey-search module provides vector similarity search with HNSW/FLAT indexing, plus full-text, tag, and numeric range queries
- Cloud-native: AWS ElastiCache 9.0+ and Google Cloud Memorystore both support Valkey with vector search
- The existing
EmbeddingRedisclass usesredis-pywhich targets the SSPL-licensed Redis server
Implementation
Following the existing pattern (EmbeddingRedis, EmbeddingMilvus, etc.):
ValkeyConfiginconfigs.py— host, port, credentials, TLS (all env-var backed)EmbeddingValkeyinembeddings.py— standalone class implementingcreate_new_embedding,search_index,delete_index- Registry —
"valkey"added toVectorDBRegistryand_supported["vector_db"] - Dependency —
valkey-glide-sync(lazy-imported, optional) - Tests — unit tests for config/registry + integration tests for create/search/delete
Requirements
- Valkey server >= 9.1 with valkey-search module >= 1.2.0
- Python:
pip install valkey-glide-sync(v2.3.1+, supports Python 3.9-3.13) - Docker for testing:
docker run -d -p 6379:6379 valkey/valkey-bundle:9.1.0-rc2
Design Decisions
- Standalone class — API differences with GLIDE vs redis-py make a shared base impractical
- Sync client only — matches the synchronous pattern used by all other embedding classes
- No cluster mode — standalone only for initial implementation
- Individual hset writes — HNSW indexing processes writes synchronously, causing Batch/pipeline timeouts; individual calls are reliable and match
EmbeddingRedispattern
Source: llmware-ai/llmware