You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
##Problem
The .NET Agent Framework currently has no dedicated Valkey integration package. While StackExchange.Redis (already in Directory.Packages.props) is protocol-compatible with Valkey for basic key-value operations, there is no ChatHistoryProvider or AIContextProvider implementation backed by Valkey.
Teams running Valkey in production — whether self-hosted or through managed cloud services like AWS ElastiCache for Valkey or GCP Memorystore for Valkey — have no first-party way to use Valkey for persistent chat history or long-term memory context in the .NET Agent Framework. This has become increasingly common since the Redis license change.
##Proposed Solution
Add a new Microsoft.Agents.AI.Valkey NuGet package providing:
ValkeyChatHistoryProvider — persistent chat history implementing ChatHistoryProvider, using StackExchange.Redis (which is protocol-compatible with Valkey) for basic key-value/list operations. Follows the same patterns as CosmosChatHistoryProvider with state management via ProviderSessionState, configurable message limits, and session-scoped isolation.
ValkeyContextProvider — long-term memory context provider extending MessageAIContextProvider, using Valkey's native vector search capabilities (FT.CREATE / FT.SEARCH) for semantic retrieval of past conversation context. Follows the same patterns as Mem0Provider with configurable scopes, context prompts, and message filtering.
The package would follow the same structure and patterns as Microsoft.Agents.AI.CosmosNoSql (for ChatHistoryProvider) and Microsoft.Agents.AI.Mem0 (for AIContextProvider).
##Server Requirements
ValkeyChatHistoryProvider: Works with any Valkey (or Redis OSS) server — basic key-value operations only.
ValkeyContextProvider: Requires valkey-search >= 1.2 (ships with valkey-bundle >= 9.1.0). Can be tested on valkey/valkey-bundle:9.1.0-rc1.
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 AWS, GCP, and other major cloud providers
Migration path: Easy migration from Redis deployments for teams affected by the Redis license change
Description
##Problem
The .NET Agent Framework currently has no dedicated Valkey integration package. While StackExchange.Redis (already in Directory.Packages.props) is protocol-compatible with Valkey for basic key-value operations, there is no ChatHistoryProvider or AIContextProvider implementation backed by Valkey.
Teams running Valkey in production — whether self-hosted or through managed cloud services like AWS ElastiCache for Valkey or GCP Memorystore for Valkey — have no first-party way to use Valkey for persistent chat history or long-term memory context in the .NET Agent Framework. This has become increasingly common since the Redis license change.
##Proposed Solution
Add a new Microsoft.Agents.AI.Valkey NuGet package providing:
ValkeyChatHistoryProvider — persistent chat history implementing ChatHistoryProvider, using StackExchange.Redis (which is protocol-compatible with Valkey) for basic key-value/list operations. Follows the same patterns as CosmosChatHistoryProvider with state management via ProviderSessionState, configurable message limits, and session-scoped isolation.
ValkeyContextProvider — long-term memory context provider extending MessageAIContextProvider, using Valkey's native vector search capabilities (FT.CREATE / FT.SEARCH) for semantic retrieval of past conversation context. Follows the same patterns as Mem0Provider with configurable scopes, context prompts, and message filtering.
The package would follow the same structure and patterns as Microsoft.Agents.AI.CosmosNoSql (for ChatHistoryProvider) and Microsoft.Agents.AI.Mem0 (for AIContextProvider).
##Server Requirements
ValkeyChatHistoryProvider: Works with any Valkey (or Redis OSS) server — basic key-value operations only.
ValkeyContextProvider: Requires valkey-search >= 1.2 (ships with valkey-bundle >= 9.1.0). Can be tested on valkey/valkey-bundle:9.1.0-rc1.
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 AWS, GCP, and other major cloud providers
Migration path: Easy migration from Redis deployments for teams affected by the Redis license change
Parity: Companion to the Python agent-framework-valkey package (see Python: [Feature]: Add Valkey Context Provider and Chat Message Store #5260)
Code Sample
using Microsoft.Agents.AI; using Microsoft.Agents.AI.Valkey; // Chat history provider — basic key-value operations, no search module needed var historyProvider = new ValkeyChatHistoryProvider( connectionString: "localhost:6379", stateInitializer: session => new ValkeyChatHistoryProvider.State { ConversationId = session?.Id ?? "default" }); // Context provider — requires valkey-search module var contextProvider = new ValkeyContextProvider( connectionString: "localhost:6379", stateInitializer: session => new ValkeyContextProvider.State { SearchScope = new ValkeyProviderScope { UserId = "user-123" }, StorageScope = new ValkeyProviderScope { UserId = "user-123" } }); var agent = new ChatClientAgent(chatClient, "HelpfulBot") { ChatHistoryProvider = historyProvider, ContextProviders = { contextProvider } };Language/SDK
.NET