agentscope-ai / agentscope-ai/agentscope
[Feature]: Add Valkey vector store for RAG pipeline
- Vorherrschende Sprache
- Python
- Sterne
- 31.6k
- Forks
- 3.5k
- Ø Merge
- 1 T. 16 Std.
- Gemergte PRs (30 T.)
- 103
Beschreibung
## Feature Description
Add a Valkey-based vector store implementation (`ValkeyStore`) to the RAG module, enabling Valkey as a vector database backend for AgentScope's knowledge base and retrieval pipeline.
## Motivation
AgentScope's existing `RedisMemory` for session/working memory already uses basic Redis commands that are fully Valkey-compatible. However, there is no vector store implementation that leverages Valkey's Search module for semantic retrieval. Developers with existing Valkey infrastructure currently need a separate vector database for RAG pipelines.
Adding a Valkey vector store allows Valkey to serve as a unified backend for both agent state (session/memory) and vector search (RAG), reducing infrastructure complexity.
## Proposed Implementation
- New class `ValkeyStore(VDBStoreBase)` in `src/agentscope/rag/_store/_valkey_store.py`
- Uses Valkey Search module with HNSW indexing for vector similarity search
- Supports configurable distance metrics (Cosine, L2, IP)
- Supports metadata storage and filtering
- Uses `valkey-glide` as the client library
- Follows the existing async pattern (matching `QdrantStore`, `MongoDBStore`, etc.)
- New optional dependency group `valkey` in `pyproject.toml`
- Unit tests
Adding a Valkey vector store allows Valkey to serve as a unified backend for both agent state (session/memory) and vector search (Rores: `QdrantStore`, `MilvusLiteStore`, `MongoDBStore`, `OceanBaseStore`, `AlibabaCloudMySQLStore`
- Base class: `VDBStoreBase` in `src/agentscope/rag/_store/_store_base.py`
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.