.Net: Update Foundry Agents for Responses API#4502
Draft
rogerbarreto wants to merge 10 commits intomicrosoft:mainfrom
Draft
.Net: Update Foundry Agents for Responses API#4502rogerbarreto wants to merge 10 commits intomicrosoft:mainfrom
rogerbarreto wants to merge 10 commits intomicrosoft:mainfrom
Conversation
…nto features/foundry-agent-client
- Add model parameter to FoundryAgentClient simple constructor - Add chatClientFactory parameter to both constructors - Switch to OpenAI.GetProjectResponsesClientForModel for direct Responses API usage - Add FoundryAgents-RAPI samples (Step01 Basics, Step02 Multiturn, Step03 FunctionTools) - Add solution folder entry for FoundryAgents-RAPI samples Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add FoundryAgentClient constructor that reads AZURE_AI_PROJECT_ENDPOINT and AZURE_AI_MODEL_DEPLOYMENT_NAME from environment variables with DefaultAzureCredential - Simplify RAPI samples to use auto-discovery (no env var or credential code) - Remove Azure.Identity direct references from sample csproj files - Update READMEs to document environment variable requirements Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Step04: Function tools with human-in-the-loop approvals - Step05: Structured output with typed responses - Step06: Persisted conversations with session serialization - Step07: Observability with OpenTelemetry - Step08: Dependency injection with hosted service - Step10: Image multi-modality - Step11: Agent as function tool (agent composition) - Step12: Middleware (PII, guardrails, function logging, HITL approval) - Update solution file and folder README with all new samples Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Step09: MCP client as tools (GitHub server via stdio) - Step13: Plugins with dependency injection - Step14: Code Interpreter tool - Step15: Computer Use tool with screenshot simulation - Step16: File Search with vector stores - Step17: OpenAPI tools (REST Countries API) - Step18: Bing Custom Search - Step19: SharePoint grounding - Step20: Microsoft Fabric - Step21: Web Search with citations - Step22: Memory Search with multi-turn conversations - Step23: Local MCP via HTTP (Microsoft Learn) - Switch all samples (Step04-Step12) to use AzureCliCredential with env vars - Update solution file and README with all 23 samples - All 23 samples build successfully, tested Step05/06/11/13/21 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Document that SHAREPOINT_PROJECT_CONNECTION_ID and FABRIC_PROJECT_CONNECTION_ID should use the connection name (e.g., 'SharepointTestTool'), not the full ARM resource URI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tion ID formats - Normalize AZURE_FOUNDRY_PROJECT_* env vars to AZURE_AI_PROJECT_ENDPOINT / AZURE_AI_MODEL_DEPLOYMENT_NAME across all samples (Steps 18-22 READMEs + Steps 19-20 Program.cs) - Fix RAPI Step05 StructuredOutput to use full constructor with ResponseFormat for streaming JSON - Update Deep Research sample to use AzureCliCredential - Enrich Bing Grounding README with full ARM resource URI format - Fix Bing Custom Search README env var mismatch (BING_CUSTOM_SEARCH_* -> AZURE_AI_CUSTOM_SEARCH_*) - Add finding instructions for connection ID and instance name in Bing Custom Search READMEs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Refactor RAPI Step22 MemorySearch: extract store setup to EnsureMemoryStoreAsync local function - Refactor non-RAPI Step22 MemorySearch: same pattern with explicit memory lifecycle - Set UpdateDelay=0 on MemoryUpdateOptions and MemorySearchPreviewTool for faster ingestion - Use WaitForMemoriesUpdateAsync with 500ms polling interval - Switch Step19 SharePoint, Step20 Fabric, Step22 MemorySearch (both) to DefaultAzureCredential - Remove SearchOptions from MemorySearchPreviewTool (causes unknown parameter error) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
alliscode
reviewed
Mar 5, 2026
Comment on lines
+12
to
+13
| // Create a FoundryAgentClient that uses the Responses API directly. | ||
| // No server-side agent is created — instructions and model are provided locally. |
Member
There was a problem hiding this comment.
nit: We should avoid talking about what the samples used to do like 'no server-side agent`. Lot's more of this issue elsewhere.
Suggested change
| // Create a FoundryAgentClient that uses the Responses API directly. | |
| // No server-side agent is created — instructions and model are provided locally. | |
| // Create a FoundryAgentClient |
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
Contribution Checklist