.NET: Add sample to show multiple AIContextProvider usage#3284
Merged
westey-m merged 6 commits intomicrosoft:mainfrom Jan 21, 2026
Merged
.NET: Add sample to show multiple AIContextProvider usage#3284westey-m merged 6 commits intomicrosoft:mainfrom
westey-m merged 6 commits intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
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 |
dotnet/samples/GettingStarted/Agents/Agent_Step20_AdditionalAIContext/Program.cs
Outdated
Show resolved
Hide resolved
dotnet/samples/GettingStarted/Agents/Agent_Step20_AdditionalAIContext/Program.cs
Show resolved
Hide resolved
dotnet/samples/GettingStarted/Agents/Agent_Step20_AdditionalAIContext/Program.cs
Outdated
Show resolved
Hide resolved
dotnet/samples/GettingStarted/Agents/Agent_Step20_AdditionalAIContext/Program.cs
Show resolved
Hide resolved
dotnet/samples/GettingStarted/Agents/Agent_Step20_AdditionalAIContext/Program.cs
Show resolved
Hide resolved
dotnet/samples/GettingStarted/Agents/Agent_Step20_AdditionalAIContext/Program.cs
Show resolved
Hide resolved
dotnet/samples/GettingStarted/Agents/Agent_Step20_AdditionalAIContext/Program.cs
Show resolved
Hide resolved
dotnet/samples/GettingStarted/Agents/Agent_Step20_AdditionalAIContext/Program.cs
Outdated
Show resolved
Hide resolved
…m/agent-framework into aicontextprovider-sample
SergeyMenshykh
approved these changes
Jan 19, 2026
rogerbarreto
approved these changes
Jan 21, 2026
arisng
pushed a commit
to arisng/agent-framework
that referenced
this pull request
Feb 2, 2026
…3284) * Add sample to show multiple AIContextProvider usage * Update comment. * Update messaging in README. * Address PR comments. --------- Co-authored-by: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com>
This was referenced Feb 2, 2026
This was referenced Feb 10, 2026
This was referenced Feb 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
#2933
Description
Contribution Checklist