Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
ValkeyChatHistoryProvider persists .NET agent conversation history in Valkey lists. It works with Valkey and compatible Redis OSS servers without requiring a search module.
This integration uses the conversation-storage pattern: it reloads exact messages rather than extracting or retrieving semantic memories.
This integration stores the full transcript; it doesn't extract semantic memories or provide vector retrieval.
Install the packages
dotnet add package Microsoft.Agents.AI.Valkey --prerelease
dotnet add package Microsoft.Agents.AI.Foundry --prerelease
Configure persistent history
Create the Valkey connection, choose a conversation key in the state initializer, and attach the provider through ChatHistoryProvider.
KeyPrefix separates application data, and MaxMessages bounds the retained transcript. Use an application-owned stable conversation ID when history must be resumed after a restart.
Production considerations
- Use encrypted connections, authenticated users, and network isolation.
- Define persistence and eviction policies that match your durability requirements.
- Store conversation identifiers in trusted server-side state and verify ownership before loading history.
- Use separate key prefixes or deployments when tenant isolation requires it.