[feat] Add Valkey database and Vector database adapters#7794
Closed
edlng wants to merge 3 commits into
Closed
Conversation
Signed-off-by: Edward Liang <edward.liang@improving.com>
Contributor
PR TriageMissing issue link: Please link the issue this PR addresses using |
Contributor
|
This pull request has been automatically marked as stale due to 14 days of inactivity. If this is still relevant, please update it or leave a comment. |
Contributor
Author
|
Unmarking as stale. |
Contributor
Author
|
Hey @kausmeows , could you take a quick look at this PR? |
Signed-off-by: Edward Liang <edward.liang@improving.com>
Contributor
Author
|
Hey @kausmeows , could you take a quick look at this PR? |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #7795
Adds Valkey as a database backend (session store) and vector database adapter, using the Valkey GLIDE client (
valkey-glide). Valkey is a Redis fork maintained by the Linux Foundation.The session store (
ValkeyDb) implements theBaseDbinterface: sessions, memories, metrics, evals, knowledge, cultural knowledge, traces, spans, and learnings. Data is stored as JSON in Valkey keys with secondary index sets for filtered lookups.The vector store (
ValkeyDB) supports vector similarity search, keyword search, and document CRUD using Valkey's search module (forFT.SEARCH). Supports auth, TLS, and database selection.Includes cookbook examples for storage and vector DB usage, unit tests with a mocked GLIDE client, integration tests against a live Valkey instance, and schema definitions that document the expected fields for each record type.
Type of change
Checklist
./scripts/format.shand./scripts/validate.sh)Duplicate and AI-Generated PR Check
Additional notes
Known limitations, both consistent left as-is to remain consistent with the existing Redis adapter:
_find_keys_by_tagcaps results at 1000 documents. Documented in the docstring.keyword_searchdoes not escape FT.SEARCH special characters. Documented in the docstring. Fixing this properly means changing both Redis and Valkey together, better as a separate PR.