Skip to content

Redis vector store

Redis Stack with the RediSearch module, providing vector and native full-text search, selected via VECTOR_STORE_PROVIDER=redis.

Enable it

bash
VECTOR_STORE_PROVIDER=redis
REDIS_URL=redis://localhost:6379

Install the client: pip install redis.

Configuration

VariableDefaultDescription
VECTOR_STORE_PROVIDERpgvectorSet to redis to use this store.
REDIS_URLredis://localhost:6379URL of a running Redis Stack (or Redis with RediSearch >= 2.4).

Notes

  • Requires Redis Stack or Redis with the RediSearch module (>= 2.4). Plain Redis will not work, since there is no FT.CREATE.
  • Unit-tested against a mocked redis client, not integration-tested against a live Redis Stack. The RediSearch query syntax and index schema are written against the RediSearch 2.x docs but unverified end to end.
  • keyword_search is native: it uses RediSearch's TEXT index with BM25 scoring, a real server-side keyword path (unlike Milvus).
  • Only promoted TAG fields (scope keys, hash, source, memory_type, tenancy) are filterable server-side. A filter on any other key (e.g. something nested in metadata) is applied in Python after the fetch, which interacts badly with top_k.
  • Each memory is one Redis HASH at {collection_name}:{id}; valid_to uses a year-9999 sentinel in place of Postgres 'infinity'.

The memory layer for AI agents.