.NET: Add Foundry Agents Tool Sample - Bing Custom Search#3701
Merged
rogerbarreto merged 7 commits intomicrosoft:mainfrom Feb 24, 2026
Merged
.NET: Add Foundry Agents Tool Sample - Bing Custom Search#3701rogerbarreto merged 7 commits intomicrosoft:mainfrom
rogerbarreto merged 7 commits intomicrosoft:mainfrom
Conversation
…ions - Add MEAI (Option 1) and Native SDK (Option 2) agent creation patterns - Add DefaultAzureCredential with standard WARNING comment - Add sample to solution file and FoundryAgents README index - Improve README with connection ID/instance name guidance - Fix missing newline at EOF in .csproj - Suppress CS8321 for unused local function pattern Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…nto feature/3674-bing-custom-search # Conflicts: # dotnet/agent-framework-dotnet.slnx # dotnet/samples/GettingStarted/FoundryAgents/README.md
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new Foundry Agents sample (Step 21) demonstrating Bing Custom Search tool integration. The sample provides two approaches for creating agents: one using MEAI abstraction with AsAITool() wrapping, and another using native SDK types with PromptAgentDefinition. It includes comprehensive documentation on setup requirements, connection ID and instance name configuration, and expected behavior.
Changes:
- Added FoundryAgents_Step21_BingCustomSearch sample with README, Program.cs, and project file
- Updated parent README.md to include the new sample in the table of contents
- Added project reference to the solution file
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/samples/GettingStarted/FoundryAgents/README.md | Added table entry for new Bing Custom Search sample (Step 21) |
| dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step21_BingCustomSearch/README.md | Comprehensive documentation covering setup, prerequisites, two agent creation approaches, and usage instructions |
| dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step21_BingCustomSearch/Program.cs | Sample implementation showing Bing Custom Search integration with two agent creation patterns |
| dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step21_BingCustomSearch/FoundryAgents_Step21_BingCustomSearch.csproj | Project configuration with required package and project references |
| dotnet/agent-framework-dotnet.slnx | Added new project to solution file in correct alphabetical position |
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step21_BingCustomSearch/Program.cs
Outdated
Show resolved
Hide resolved
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step21_BingCustomSearch/README.md
Outdated
Show resolved
Hide resolved
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step21_BingCustomSearch/README.md
Show resolved
Hide resolved
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step21_BingCustomSearch/Program.cs
Outdated
Show resolved
Hide resolved
SergeyMenshykh
approved these changes
Feb 24, 2026
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step21_BingCustomSearch/Program.cs
Outdated
Show resolved
Hide resolved
westey-m
reviewed
Feb 24, 2026
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step21_BingCustomSearch/README.md
Show resolved
Hide resolved
westey-m
approved these changes
Feb 24, 2026
- Add Async suffix to CreateAgentWithMEAI and CreateAgentWithNativeSDK methods - Clarify comment to reference ResponseTool instead of BingCustomSearchTool - Update README Option 1 description to accurately reflect SDK usage Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
SergeyMenshykh
approved these changes
Feb 24, 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
Description
Adds a Foundry Agents sample demonstrating Bing Custom Search tool integration with two agent creation approaches:
AsAITool()wrapping for portable, abstraction-first agent creationPromptAgentDefinitionwithAgentVersionCreationOptionsdirectlyIncludes README with connection ID and instance name setup guidance.
Contribution Checklist