A semantic cache library for LLM queries that stores responses and reuses them for similar questions to cut API costs and latency.
redis/redis-vl-python
Python client library for building vector search, RAG, semantic caching and LLM memory on top of Redis.
- Stars
- 433
- Forks
- 121
- Open issues
- 66
- Last commit
- 22 hours ago
What is it?
RedisVL (Redis Vector Library) is a Python client for using Redis as the storage and search layer for AI applications. It lets you define an index schema with text, tag, numeric, geo and vector fields, create the index in Redis, load and fetch records, and run vector, range, filter, full-text and hybrid queries with metadata filters.
Beyond core search, the library includes extensions for common LLM patterns: a semantic cache that returns stored responses for similar prompts, an embedding cache, a message history that supports recency and relevance lookups, and a semantic router that maps queries to predefined routes. It also provides vectorizer integrations for providers such as OpenAI, Cohere, HuggingFace, VoyageAI and Mistral, along with reranker integrations.
A command-line tool, `rvl`, manages indexes from the terminal. An MCP server can expose existing Redis indexes to MCP-compatible clients with search and optional upsert tools. The project requires Python 3.10 or later and is built on the redis-py client.
Key features
- 01Define index schemas over text, tag, numeric, geo and vector fields, from YAML or Python dicts.
- 02Run vector, range, filter, full-text (BM25) and hybrid queries with metadata filtering.
- 03Semantic caching for LLM responses and caching of embedding vectors.
- 04Message history with recency and relevance retrieval, plus semantic routing.
- 05Vectorizer integrations for multiple embedding providers and reranker support.
- 06CLI `rvl` for index management and an MCP server over stdio, Streamable HTTP or SSE.
Use cases
- Building retrieval-augmented generation pipelines that store and query document embeddings in Redis.
- Reducing LLM API costs by caching responses to semantically similar prompts.
- Giving chatbots or agents conversation memory retrieved by recency or relevance.
- Routing user messages to predefined intents or topics with low-latency lookups.
Quick start
- 1
Install the library with pip
pip install redisvl - 2
Start a local Redis instance with Docker
docker run -d --name redis -p 6379:6379 redis:latest - 3
Create a search index against your Redis instance using the examples in the README
Things to know
- Requires a running Redis instance; Redis 8+ is needed for built-in vector search features.
- Some features, such as HybridQuery, need Redis 8.4.0 or later.
- Some vectorizer providers need a paid API key from the provider.
In collections
Topics
FAQ
- What is redis-vl-python?
- Python client library for building vector search, RAG, semantic caching and LLM memory on top of Redis. RedisVL (Redis Vector Library) is a Python client for using Redis as the storage and search layer for AI applications. It lets you define an index schema with text, tag, numeric, geo and vector fields, create the index in Redis, load and fetch records, and run vector, range, filter, full-text and hybrid queries with metadata filters.
- Is redis-vl-python free to use? What license does it have?
- redis-vl-python is open source under the MIT license. Check the license terms before using it in commercial products.
- Is redis-vl-python still maintained?
- Actively maintained. The last commit to redis-vl-python was on Nov 6, 2026.
- What can I use redis-vl-python for?
- Building retrieval-augmented generation pipelines that store and query document embeddings in Redis. Reducing LLM API costs by caching responses to semantically similar prompts. Giving chatbots or agents conversation memory retrieved by recency or relevance. Routing user messages to predefined intents or topics with low-latency lookups.
- How do I install redis-vl-python?
- Install the library with pip: pip install redisvl Start a local Redis instance with Docker: docker run -d --name redis -p 6379:6379 redis:latest Create a search index against your Redis instance using the examples in the README
- Where can I get redis-vl-python?
- The source code and installation instructions are on GitHub: https://github.com/redis/redis-vl-python
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Embeddable vector database for Go with a Chroma-like interface, no third-party dependencies, and optional on-disk persistence.
Epsilla is an open-source C++ vector database for embedding similarity search, with metadata filtering, hybrid search, and LLM retrieval integrations.
A local vector index and RAG toolkit that cuts storage by about 97% by recomputing embeddings on demand, so you can search personal data on your laptop.
A Java library giving JVM applications one unified API for LLM providers and vector stores, with tool calling, agents and RAG.
A Rust-based server for deploying and serving open-source text embedding and reranker models over HTTP and gRPC.