Skip to content

Conversation

@westey-m
Copy link
Contributor

Motivation and Context

#2933

Description

  • Adding a sample with an AggregateAIContextProvider that shows how to combine the AIContext from multiple providers together, and shows a couple of sample AIContextProviders at the same time.

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 January 19, 2026 14:10
@markwallace-microsoft markwallace-microsoft added documentation Improvements or additions to documentation .NET labels Jan 19, 2026
@github-actions github-actions bot changed the title Add sample to show multiple AIContextProvider usage .NET: Add sample to show multiple AIContextProvider usage Jan 19, 2026
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 adds a comprehensive sample demonstrating how to use multiple AIContextProvider instances with agents, addressing issue #2933. The sample shows how to aggregate multiple providers and demonstrates practical use cases including a todo list manager and calendar integration.

Changes:

  • Added a new sample Agent_Step20_AdditionalAIContext that demonstrates AIContextProvider usage
  • Implemented an AggregatingAIContextProvider to combine multiple context providers
  • Updated the main README to reference the new sample

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
dotnet/samples/GettingStarted/Agents/README.md Added entry for the new Step 20 sample with description
dotnet/samples/GettingStarted/Agents/Agent_Step20_AdditionalAIContext/Program.cs Main sample code implementing TodoListAIContextProvider, CalendarSearchAIContextProvider, and AggregatingAIContextProvider with demonstration usage
dotnet/samples/GettingStarted/Agents/Agent_Step20_AdditionalAIContext/Agent_Step20_AdditionalAIContext.csproj Project file with necessary dependencies and configuration matching other samples
dotnet/agent-framework-dotnet.slnx Added the new project to the solution file

@westey-m westey-m added this pull request to the merge queue Jan 21, 2026
Merged via the queue into microsoft:main with commit 41cc344 Jan 21, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation .NET

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants