-
Notifications
You must be signed in to change notification settings - Fork 816
.NET: Chathistory memory provider add #1867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET: Chathistory memory provider add #1867
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new vector data memory provider for the Microsoft Agents framework. The implementation enables storing and retrieving chat history using vector stores with semantic similarity search capabilities.
Key changes:
- New
ChatHistoryMemoryProviderclass that implementsAIContextProviderto store chat messages in a vector store and retrieve relevant context - Support for scoping chat history by application, agent, thread, and user through
ChatHistoryMemoryProviderScope - Configurable search behavior (automatic vs. on-demand function calling) via
ChatHistoryMemoryProviderOptions
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/src/Microsoft.Agents.AI.VectorDataMemory/ChatHistoryMemoryProvider.cs | Core implementation of the chat history memory provider with vector store integration |
| dotnet/src/Microsoft.Agents.AI.VectorDataMemory/ChatHistoryMemoryProviderScope.cs | Defines scoping parameters for filtering chat history |
| dotnet/src/Microsoft.Agents.AI.VectorDataMemory/ChatHistoryMemoryProviderOptions.cs | Configuration options for search behavior and context formatting |
| dotnet/src/Microsoft.Agents.AI.VectorDataMemory/VectorDataMemoryJsonUtilities.cs | JSON serialization utilities with AOT/trimming support |
| dotnet/src/Microsoft.Agents.AI.VectorDataMemory/Microsoft.Agents.AI.VectorDataMemory.csproj | Project file for the new library |
| dotnet/tests/Microsoft.Agents.AI.VectorDataMemory.UnitTests/ChatHistoryMemoryProviderTests.cs | Comprehensive unit tests covering various scenarios |
| dotnet/tests/Microsoft.Agents.AI.VectorDataMemory.UnitTests/Microsoft.Agents.AI.VectorDataMemory.UnitTests.csproj | Test project configuration |
| dotnet/src/Microsoft.Agents.AI/ChatClient/ChatClientAgentThread.cs | Updated to handle undefined JSON values in serialization |
| dotnet/agent-framework-dotnet.slnx | Added new projects to solution |
| dotnet/Directory.Packages.props | Added VectorData.Abstractions package dependency |
dotnet/src/Microsoft.Agents.AI.VectorDataMemory/ChatHistoryMemoryProvider.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Microsoft.Agents.AI.VectorDataMemory/ChatHistoryMemoryProvider.cs
Outdated
Show resolved
Hide resolved
…oryProvider.cs Co-authored-by: Copilot <[email protected]>
Motivation and Context
#1680
Description
Contribution Checklist