Skip to main content
The redis backend uses Redis as the vector store. Knowledge text is embedded by an embedding model, written to Redis via LlamaIndex, and retrieved by similarity. The index collection name equals index.

When to use

  • You already run a Redis instance with the RediSearch module enabled;
  • You want Redis as a low-latency vector-search backend with persistence and multi-instance sharing.

Dependencies

Redis must support RediSearch (vector search).

Usage

Before running, configure MODEL_EMBEDDING_NAME, MODEL_EMBEDDING_DIM, MODEL_EMBEDDING_API_BASE, and MODEL_EMBEDDING_API_KEY. The extensions extra includes llama-index, embedding adapters, and vector-store connectors. Text is sent to the configured embedding service. For BytePlus or another provider, explicitly set the matching endpoint, model, and credentials; the default Ark endpoint does not automatically switch Also configure the Redis variables below and grant index creation and access permissions. Durability depends on Redis persistence and backup configuration
You can also pass connection config explicitly via backend_config:

Parameters

KnowledgeBase parameters

Constructor parameters

backend_config supports the following settings:

Redis connection config

redis_config is a RedisConfig with env prefix DATABASE_REDIS_:

Embedding config

embedding_config is an EmbeddingModelConfig with env prefix MODEL_EMBEDDING_:

Environment variables

The vector field dimension is taken from the embedding config (MODEL_EMBEDDING_DIM). The Redis instance must have the RediSearch module enabled, otherwise the vector index cannot be created.
The example search should return the annual-leave policy. For empty results, check successful ingestion, matching embedding dimensions, completed server processing, network access, and permissions. Managed ingestion may not be immediately searchable. Running the configured Agent also requires model credentials
Last modified on September 19, 2026