Skip to content

Python: [Feature]: Add Valkey Context Provider and Chat Message Store #5260

@daric93

Description

@daric93

Description

Problem

The current agent-framework-redis package depends on redisvl>=0.8.2, which requires Redis Stack's RediSearch module for the RedisContextProvider's vector operations. While Redis and Valkey are mostly protocol-compatible for core features, their search modules are not compatible — code that requires RediSearch will not work with Valkey's valkey-search module. Additionally, the RedisVL library itself has known incompatibilities with Valkey. Since this dependency is bundled at the package level, even the RedisChatMessageStore (which only needs basic key-value operations) pulls in RedisVL.

This is a practical blocker for teams running Valkey in production — whether self-hosted or through managed cloud services — which has become increasingly common since the Redis license change.

Proposed Solution

Add a new agent-framework-valkey package providing:

  1. ValkeyChatMessageStore — persistent chat message storage implementing ChatMessageStoreProtocol, using valkey-glide (the official Valkey Python client) for basic key-value operations.

  2. ValkeyContextProvider — long-term memory context provider implementing the ContextProvider protocol, using valkey-glide with Valkey's native vector search capabilities for semantic retrieval of past conversation context.

The package would follow the same structure and patterns as agent-framework-redis and agent-framework-mem0.

Value

  • Performance: Valkey's valkey-search module delivers single-digit millisecond latency with 99%+ recall for vector search operations
  • Scaling: Linear scaling with cluster mode support
  • Open-source governance: Linux Foundation project with community-driven development, clear licensing
  • Cloud support: Managed services from major cloud providers.
  • Migration path: Easy migration from Redis deployments for teams affected by the Redis license change

Code Sample

Language/SDK

Python

Metadata

Metadata

Assignees

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions