Valkey Agentic Memory
This guide covers deploying Valkey as the agentic memory backend for the Semantic Router. Valkey provides a lightweight, Redis-compatible alternative to Milvus for vector similarity storage using the built-in Search module.
备注
Valkey is optional. The default memory backend is Milvus. Use Valkey when you want a single-binary deployment without external dependencies like etcd or MinIO, or when you already run Valkey for caching.
When to Use Valkey vs Milvus
| Concern | Valkey | Milvus |
|---|---|---|
| Deployment complexity | Single binary with Search module | Requires etcd, MinIO/S3, optional Pulsar |
| Horizontal scaling | Cluster mode (manual sharding) | Native distributed architecture |
| Memory model | In-memory with optional persistence | Disk-based with memory-mapped indexes |
| Best for | Small-to-medium workloads, dev/test, existing Redis/Valkey infra | Large-scale production, billions of vectors |
| Vector index | HNSW via FT.CREATE | HNSW, IVF_FLAT, IVF_SQ8, and more |
Prerequisites
- Valkey 8.0+ with the Search module enabled
- Text support for vector search was added in Search module version 1.2.0
- The
valkey/valkey-bundleDocker image includes Search out of the box. Search module 1.2.0 is available in theunstableand9.1.0-rc1valkey-bundle versions - If your Valkey deployment does not include the Search module, you can add it manually
- For Kubernetes: Helm 3.x and
kubectlconfigured
Trouble with the Search module?
If you run into issues loading or using the Search module, please open an issue so we can help.