[FEATURE] Add Valkey as a storage backend for the unified memory system
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 58.8k
- Forks
- 8.5k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 109
Description
Feature Area
Core functionality
Is your feature request related to a an existing bug? Please link it here.
CrewAI's memory system currently supports LanceDB (embedded) and Qdrant for storage. For production deployments that need a distributed, low-latency key-value store with vector search capabilities, there's no built-in option. Users who want to run CrewAI in distributed or containerized environments need a storage backend that supports shared state across processes without relying on embedded databases or local file systems.
Additionally, the caching layer for A2A agent cards and file uploads currently only supports in-memory or Redis backends. There's no option for Valkey, which is the open-source, community-driven successor to Redis.
Describe the solution you'd like
Add Valkey as a first-class storage backend for CrewAI's unified memory system using the valkey-glide client. This should include:
- A ValkeyStorage class implementing the StorageBackend protocol with full CRUD, vector search (via Valkey Search module), scope management, category indexing, and metadata filtering
- A ValkeyCache class for simple key-value caching with TTL support, usable by A2A and file upload subsystems
- VALKEY_URL environment variable support for configuring cache backends across the framework
- An optional dependency group (pip install crewai[valkey]) so the core package stays lightweight
Describe alternatives you've considered
- Redis: Valkey is wire-compatible with Redis but is fully open-source (BSD license) without the dual-licensing concerns introduced by Redis Ltd. in 2024. The valkey-glide client is maintained by the Valkey community and AWS.
- Qdrant: Already supported, but requires a separate vector database service. Valkey can serve as both the key-value store and vector search engine in a single service.
- LanceDB: The current default, but it's embedded and doesn't support distributed access across multiple processes or containers.
Additional context
Valkey is a Linux Foundation project forked from Redis 7.2. It supports the Redis Search module for server-side vector similarity search (KNN with cosine distance), making it suitable for both caching and memory storage in a single deployment.
Willingness to Contribute
Yes, I'd be happy to submit a pull request
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the unified memory system's StorageBackend protocol and the existing cache backend implementations, then review how optional dependency groups and VALKEY_URL configuration are handled. Done means ValkeyStorage supports CRUD, vector search, scopes, category indexing, and metadata filtering; ValkeyCache supports TTLs for A2A and file uploads; and the optional valkey dependency keeps the core package lightweight.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, databases, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100