Feat/add valkey search#5005
Conversation
- Implemented Valkey Search as a vector database example in Agno. - Created Docker Compose configuration for Valkey service. - Developed core functionality for document insertion, searching, and metadata management. - Included examples demonstrating basic usage, async operations, knowledge system integration, and advanced search features. - Established JSON structure for knowledge contents and integrated with the Valkey database.
…al and a test suite
|
|
||
| def _bytes_to_vector(self, data: bytes) -> List[float]: | ||
| """Convert bytes back to vector.""" | ||
| import struct |
There was a problem hiding this comment.
question: why do we need to import this thing on every function call?
There was a problem hiding this comment.
It will only be imported once in reality, at runtime.
There was a problem hiding this comment.
Sorry, my bad - yes, import will be only once. Any reason not to do this import at module level?
|
Really great to see this. Once merged, it would make a good blog post on Valkey.io where we can explain how to use it with Agno, etc. https://github.com/valkey-io/valkey-io.github.io/issues/new?template=blog_post_template.md |
|
Thanks for this, @MutshidziPhaswana really appreciate the contribution. This overlaps with #8141, which adds Valkey vector search support. We're consolidating there and closing this to avoid duplication. |
Summary
Describe key changes, mention related issues or motivation for the changes.
Type of change
This pull request introduces comprehensive support for Valkey Search, a Redis-compatible vector search engine, to the Agno framework. It adds new documentation, example code, and setup scripts to make it easy for developers to use Valkey Search as a vector database backend for knowledge-powered AI agents. The changes include updates to the README, a new example in the cookbook, Docker Compose configuration for Valkey, and integration of Valkey Search into the development setup and Python package imports.
Valkey Search Integration
cookbook/knowledge/vector_db/valkey_db/with a detailedREADME.md, example code (valkey_db.py), and Docker Compose configuration to demonstrate Valkey Search integration with Agno, including PDF content loading, vector search, and agent-based querying.Development Environment & Package Integration
scripts/dev_setup.shto install thevalkeyPython package as part of the development setup, ensuring all dependencies for Valkey Search are included.cookbook/knowledge/vector_db/valkey_db/__init__.py) and the main library (libs/agno/agno/vectordb/valkey/__init__.py) for cleaner imports and module exposure.Checklist
./scripts/format.shand./scripts/validate.sh)Additional Notes
Add any important context (deployment instructions, screenshots, security considerations, etc.)