Skip to content

Conversation

@westey-m
Copy link
Contributor

@westey-m westey-m commented Nov 3, 2025

Motivation and Context

#1680

Description

  • Add an AIContextProvider that stores chat history in a vector store and can find related messages for context later.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copilot AI review requested due to automatic review settings November 3, 2025 15:56
@github-actions github-actions bot changed the title Chathistory memory provider add .NET: Chathistory memory provider add Nov 3, 2025
Copy link
Contributor

Copilot AI left a 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 ChatHistoryMemoryProvider class that implements AIContextProvider to 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

@westey-m westey-m added this pull request to the merge queue Nov 7, 2025
Merged via the queue into microsoft:main with commit e5d9d74 Nov 7, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants