Uh oh!
There was an error while loading. Please reload this page.
.NET: Add Foundry Agents Tool Sample - Web Search - #4040
.NET: Add Foundry Agents Tool Sample - Web Search#4040Roger Barreto (rogerbarreto) merged 7 commits into
Conversation
Remove incorrect Bing Grounding connection ID requirement from the WebSearch sample. The web search tool uses the OpenAI Responses API built-in capability and does not need a connection ID. - Remove AZURE_FOUNDRY_BING_CONNECTION_ID env var requirement - Use HostedWebSearchTool() without connectionId properties - Refactor creation options into local functions (MEAI + NativeSDK) - Switch from AzureCliCredential to DefaultAzureCredential - Update README to reflect correct prerequisites Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a new .NET GettingStarted FoundryAgents_Step25_WebSearch sample demonstrating how to enable the Responses API built-in web search tool on Foundry Agents, run a query, and extract text + URL citation annotations.
Changes:
- New console sample project (
net10.0) that creates a Foundry agent with web search tooling (MEAI hosted tool, with a native SDK option shown). - Adds output processing to print text responses and URL citation annotations.
- Adds a README with prerequisites and run instructions for the new step.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step25_WebSearch/README.md | Documents purpose, prerequisites, env vars, and execution steps for the web search sample. |
| dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step25_WebSearch/Program.cs | Implements agent creation (web search enabled), execution, citation extraction, and cleanup. |
| dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step25_WebSearch/FoundryAgents_Step25_WebSearch.csproj | New sample project definition and dependencies. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Add FoundryAgents_Step25_WebSearch to agent-framework-dotnet.slnx - Add web search sample entry to parent FoundryAgents README.md - Simplify text response extraction to use response.Text directly Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Motivation and Context
Adds a new FoundryAgents_Step25_WebSearch sample demonstrating how to use the Responses API built-in web search tool with AI Agents.
Description
HostedWebSearchTool(MEAI + AgentFramework abstraction)ResponseTool.CreateWebSearchTool()(Native SDK / Responses API)Note: The web search tool uses the built-in Responses API web search capability. No Bing Grounding connection is required.
Changes
FoundryAgents_Step25_WebSearchwithProgram.csandREADME.mdContribution Checklist