llamaIndex - ✅(Solved) Fix [Feature Request]: Add Valkey Vector Store support [1 pull requests, 9 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
run-llama/llama_index#20785Fetched 2026-04-08 00:30:57
View on GitHub
Comments
9
Participants
3
Timeline
31
Reactions
0
Author
Timeline (top)
commented ×9subscribed ×9mentioned ×8cross-referenced ×2

Fix Action

Fixed

PR fix notes

PR #20889: Feature/valkey vector store

Description (problem / solution / changelog)

Description

Adds a new vector store integration for Valkey, an open-source key-value datastore that supports high-performance vector similarity search through the valkey-search module.

  • Uses valkey-glide (async) and valkey-glide-sync (sync) official clients
  • Mirrors Redis vector store API for seamless migration
  • Three initialization patterns: URL only, sync client only, async client only
  • Lazy async client creation for optimal resource usage

Fixes #20785

Dependencies

Required

  • valkey-glide>=2.2.7 - Official async Valkey client
  • valkey-glide-sync>=2.1.0 - Official sync Valkey client
  • llama-index-core>=0.13.0,<0.15 - LlamaIndex core functionality

Development

Standard LlamaIndex dev dependencies (pytest, mypy, ruff, etc.)

Motivation and Context

Valkey is gaining significant traction as an open-source alternative to Redis. Several factors make this integration timely and valuable:

  • Open Source Governance: As a Linux Foundation project, Valkey offers transparent governance and community-driven development
  • Redis Compatibility: Valkey maintains protocol compatibility for core features with Redis while adding new features, making migration straightforward
  • Performance: The valkey-search module delivers single-digit millisecond latency with 99%+ recall for vector search operations
  • Growing Adoption: Major cloud providers are offering managed Valkey services with vector search capabilities

New Package?

Did I fill in the tool.llamahub section in the pyproject.toml and provide a detailed README.md for my new integration or package?

  • Yes
  • No

Version Bump?

It is a new integration.

Type of Change

New feature (non-breaking change which adds functionality)

How Has This Been Tested?

I added new unit and integration tests to cover this change. Manual testing.

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added Google Colab support for the newly added notebooks.
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I ran uv run make format; uv run make lint to appease the lint gods

Changed files

  • docs/examples/index.md (modified, +1/-0)
  • docs/examples/vector_stores/ValkeyIndexDemo.ipynb (added, +749/-0)
  • llama-index-integrations/vector_stores/llama-index-vector-stores-valkey/.gitignore (added, +154/-0)
  • llama-index-integrations/vector_stores/llama-index-vector-stores-valkey/LICENSE (added, +21/-0)
  • llama-index-integrations/vector_stores/llama-index-vector-stores-valkey/Makefile (added, +17/-0)
  • llama-index-integrations/vector_stores/llama-index-vector-stores-valkey/README.md (added, +126/-0)
  • llama-index-integrations/vector_stores/llama-index-vector-stores-valkey/llama_index/py.typed (added, +0/-0)
  • llama-index-integrations/vector_stores/llama-index-vector-stores-valkey/llama_index/vector_stores/valkey/__init__.py (added, +7/-0)
  • llama-index-integrations/vector_stores/llama-index-vector-stores-valkey/llama_index/vector_stores/valkey/base.py (added, +1087/-0)
  • llama-index-integrations/vector_stores/llama-index-vector-stores-valkey/llama_index/vector_stores/valkey/exceptions.py (added, +5/-0)
  • llama-index-integrations/vector_stores/llama-index-vector-stores-valkey/llama_index/vector_stores/valkey/schema.py (added, +86/-0)
  • llama-index-integrations/vector_stores/llama-index-vector-stores-valkey/pyproject.toml (added, +73/-0)
  • llama-index-integrations/vector_stores/llama-index-vector-stores-valkey/tests/__init__.py (added, +0/-0)
  • llama-index-integrations/vector_stores/llama-index-vector-stores-valkey/tests/conftest.py (added, +77/-0)
  • llama-index-integrations/vector_stores/llama-index-vector-stores-valkey/tests/test_integration.py (added, +900/-0)
  • llama-index-integrations/vector_stores/llama-index-vector-stores-valkey/tests/test_unit.py (added, +419/-0)
  • llama-index-integrations/vector_stores/llama-index-vector-stores-valkey/uv.lock (added, +5201/-0)
RAW_BUFFERClick to expand / collapse

Feature Description

Add a new vector store integration for Valkey, an open-source key-value datastore that supports high-performance vector similarity search through the valkey-search module. This integration would use the official valkey-glide Python client to provide LlamaIndex users with a production-ready, AWS-supported alternative to Redis for vector search workloads.

Reason

Valkey is gaining significant traction as an open-source alternative to Redis. Several factors make this integration timely and valuable:

  1. Open Source Governance: As a Linux Foundation project, Valkey offers transparent governance and community-driven development
  2. Redis Compatibility: Valkey maintains protocol compatibility for core features with Redis while adding new features, making migration straightforward
  3. Performance: The valkey-search module delivers single-digit millisecond latency with 99%+ recall for vector search operations
  4. Growing Adoption: Major cloud providers are offering managed Valkey services with vector search capabilities

Value of Feature

  • Seamless integration with Valkey's high-performance vector search using the official valkey-glide client
  • Support for both exact (FLAT) and approximate (HNSW) algorithms with hybrid search combining vector similarity and metadata filtering
  • Linear scaling with cluster mode support, open-source licensing, and managed service options from major cloud providers
  • Provides an open-source alternative with clear governance, commercial support options, and easy migration paths from Redis deployments

extent analysis

<think> Okay, let's see. The user wants to add a Valkey vector store integration for LlamaIndex. Valkey is similar to Redis but open-source, and they're using the valkey-glide Python client. The main goal is to provide an alternative to Redis with vector search capabilities.

First, I need to outline the steps to integrate Valkey. The key components would be setting up the client, implementing the vector store interface, and ensuring compatibility with existing code. Since Valkey is Redis-compatible, the structure might be similar to an existing Redis integration.

The valkey-glide client needs to be installed, so the first step is adding it to dependencies. Then, creating a ValkeyVectorStore class that implements the required methods like add, delete, and query. The vector search module in Valkey uses specific commands, so I'll need to use the right commands for inserting vectors and querying them.

For the code example, I'll show initializing the client, adding vectors with the FT.ADD command, and querying with FT.SEARCH. Also, handling HNSW and FLAT indexes would be important. The example should include methods for creating indexes and performing searches.

Testing is crucial. The user should verify that vectors are stored and retrieved correctly, check performance metrics, and ensure compatibility with LlamaIndex's existing APIs. Also, mention possible caveats like version compatibility of valkey-glide and Valkey server, and the need for proper error handling.

I should make sure the code snippets are concise and use the correct syntax. Maybe include a sample of how to set up the client and perform a basic add and search operation. Also, note any extra parameters needed for the vector configurations, like dimensions and algorithms. </think>

Practical Solution for Valkey Vector Store Integration

Fix Plan

  1. Install valkey-glide client:
pip install valkey-glide
  1. Implement ValkeyVectorStore class:

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

llamaIndex - ✅(Solved) Fix [Feature Request]: Add Valkey Vector Store support [1 pull requests, 9 comments, 3 participants]