Skip to content

.NET: Add Foundry Agents Tool Sample - Bing Custom Search#3701

Merged
rogerbarreto merged 7 commits intomicrosoft:mainfrom
rogerbarreto:feature/3674-bing-custom-search
Feb 24, 2026
Merged

.NET: Add Foundry Agents Tool Sample - Bing Custom Search#3701
rogerbarreto merged 7 commits intomicrosoft:mainfrom
rogerbarreto:feature/3674-bing-custom-search

Conversation

@rogerbarreto
Copy link
Member

@rogerbarreto rogerbarreto commented Feb 5, 2026

Motivation and Context

Description

Adds a Foundry Agents sample demonstrating Bing Custom Search tool integration with two agent creation approaches:

  • Option 1 (MEAI): Uses AsAITool() wrapping for portable, abstraction-first agent creation
  • Option 2 (Native SDK): Uses PromptAgentDefinition with AgentVersionCreationOptions directly

Includes README with connection ID and instance name setup guidance.

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? No

@rogerbarreto rogerbarreto self-assigned this Feb 5, 2026
@markwallace-microsoft markwallace-microsoft added documentation Improvements or additions to documentation .NET labels Feb 5, 2026
@github-actions github-actions bot changed the title .Net: Add Foudry Agents Tool Sample - Bing Custom Search [WIP] .NET: Add Foudry Agents Tool Sample - Bing Custom Search [WIP] Feb 5, 2026
@rogerbarreto rogerbarreto changed the title .NET: Add Foudry Agents Tool Sample - Bing Custom Search [WIP] .NET: Add Foundry Agents Tool Sample - Bing Custom Search [WIP] Feb 5, 2026
@rogerbarreto rogerbarreto moved this to In Progress in Agent Framework Feb 12, 2026
rogerbarreto and others added 2 commits February 23, 2026 19:04
…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
@rogerbarreto rogerbarreto marked this pull request as ready for review February 23, 2026 19:11
Copilot AI review requested due to automatic review settings February 23, 2026 19:11
@rogerbarreto rogerbarreto changed the title .NET: Add Foundry Agents Tool Sample - Bing Custom Search [WIP] .NET: Add Foundry Agents Tool Sample - Bing Custom Search Feb 23, 2026
@rogerbarreto rogerbarreto moved this from In Progress to In Review in Agent Framework Feb 23, 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 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

- 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>
@rogerbarreto rogerbarreto added this pull request to the merge queue Feb 24, 2026
Merged via the queue into microsoft:main with commit 9a7d939 Feb 24, 2026
19 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in Agent Framework Feb 24, 2026
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

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants