diff --git a/skills/dotnet-microsoft-agent-framework/SKILL.md b/skills/dotnet-microsoft-agent-framework/SKILL.md index 36dc8f9..0738850 100644 --- a/skills/dotnet-microsoft-agent-framework/SKILL.md +++ b/skills/dotnet-microsoft-agent-framework/SKILL.md @@ -1,6 +1,6 @@ --- name: dotnet-microsoft-agent-framework -version: "1.4.0" +version: "1.5.0" category: "AI" description: "Build .NET AI agents and multi-agent workflows with Microsoft Agent Framework using the right agent type, threads, tools, workflows, hosting protocols, and enterprise guardrails." compatibility: "Requires preview-era Microsoft Agent Framework packages and a .NET application that truly needs agentic or workflow orchestration." diff --git a/skills/dotnet-microsoft-agent-framework/references/official-docs/user-guide/agents/agent-types/azure-ai-foundry-models-responses-agent.md b/skills/dotnet-microsoft-agent-framework/references/official-docs/user-guide/agents/agent-types/azure-ai-foundry-models-responses-agent.md index e8634ad..c7b9b51 100644 --- a/skills/dotnet-microsoft-agent-framework/references/official-docs/user-guide/agents/agent-types/azure-ai-foundry-models-responses-agent.md +++ b/skills/dotnet-microsoft-agent-framework/references/official-docs/user-guide/agents/agent-types/azure-ai-foundry-models-responses-agent.md @@ -5,7 +5,7 @@ zone_pivot_groups: programming-languages author: jozkee ms.topic: tutorial ms.author: dacantu -ms.date: 10/22/2025 +ms.date: 03/17/2026 ms.service: agent-framework --- @@ -36,12 +36,14 @@ using System.ClientModel.Primitives; using Azure.Identity; using Microsoft.Agents.AI; using OpenAI; +using OpenAI.Responses; -var clientOptions = new OpenAIClientOptions() { Endpoint = new Uri("https://.services.ai.azure.com/openai/v1/") }; +var clientOptions = new OpenAIClientOptions() { Endpoint = new Uri("https://ai-foundry-.services.ai.azure.com/openai/v1/") }; -#pragma warning disable OPENAI001 // Type is for evaluation purposes only and is subject to change or removal in future updates. -OpenAIClient client = new OpenAIClient(new BearerTokenPolicy(new AzureCliCredential(), "https://ai.azure.com/.default"), clientOptions); -#pragma warning restore OPENAI001 +// WARNING: DefaultAzureCredential is convenient for development but requires careful consideration in production. +// In production, consider using a specific credential (e.g., ManagedIdentityCredential) to avoid +// latency issues, unintended credential probing, and potential security risks from fallback mechanisms. +OpenAIClient client = new OpenAIClient(new BearerTokenPolicy(new DefaultAzureCredential(), "https://ai.azure.com/.default"), clientOptions); // You can optionally authenticate with an API key // OpenAIClient client = new OpenAIClient(new ApiKeyCredential(""), clientOptions); ``` @@ -49,12 +51,10 @@ OpenAIClient client = new OpenAIClient(new BearerTokenPolicy(new AzureCliCredent A client for responses can then be created using the model deployment name. ```csharp -#pragma warning disable OPENAI001 // Type is for evaluation purposes only and is subject to change or removal in future updates. -var responseClient = client.GetOpenAIResponseClient("gpt-4o-mini"); -#pragma warning restore OPENAI001 +var responseClient = client.GetResponsesClient("gpt-4o-mini"); ``` -Finally, the agent can be created using the `AsAIAgent` extension method on the `ResponseClient`. +Finally, the agent can be created using the `AsAIAgent` extension method on the `ResponsesClient`. ```csharp AIAgent agent = responseClient.AsAIAgent( diff --git a/skills/dotnet-microsoft-agent-framework/references/providers.md b/skills/dotnet-microsoft-agent-framework/references/providers.md index c8960fa..57c7223 100644 --- a/skills/dotnet-microsoft-agent-framework/references/providers.md +++ b/skills/dotnet-microsoft-agent-framework/references/providers.md @@ -31,9 +31,9 @@ If you start from the SDK alone, you usually miss the thread and hosting consequ | --- | --- | --- | --- | --- | | Any `IChatClient` | `new ChatClientAgent(chatClient, ...)` or `chatClient.AsAIAgent(...)` | Depends on provider | Broadest integration surface | Tooling and history are only as good as the concrete client | | Azure OpenAI Chat Completions | `AzureOpenAIClient(...).GetChatClient(...).AsAIAgent(...)` | Local or custom store | Simple chat flows | You own conversation persistence | -| Azure OpenAI Responses | `AzureOpenAIClient(...).GetOpenAIResponseClient(...).AsAIAgent(...)` | Service-backed or local, depending on mode | New OpenAI-style apps | Preview packages and mode-specific behavior | +| Azure OpenAI Responses | `AzureOpenAIClient(...).GetResponsesClient(...).AsAIAgent(...)` | Service-backed or local, depending on mode | New OpenAI-style apps | Preview packages and mode-specific behavior | | OpenAI Chat Completions | `OpenAIClient(...).GetChatClient(...).AsAIAgent(...)` | Local or custom store | Straightforward request/response chat | No service-backed history by default | -| OpenAI Responses | `OpenAIClient(...).GetOpenAIResponseClient(...).AsAIAgent(...)` | Service-backed or local, depending on mode | Long-running or richer response flows | Requires discipline about state mode | +| OpenAI Responses | `OpenAIClient(...).GetResponsesClient(...).AsAIAgent(...)` | Service-backed or local, depending on mode | Long-running or richer response flows | Requires discipline about state mode | | Azure AI Foundry Agents | `PersistentAgentsClient.CreateAIAgentAsync(...)` | Service-stored only | Managed agent resources and managed tools | Lower portability and provider-specific lifecycle | | OpenAI Assistants | provider-specific assistant client `CreateAIAgentAsync(...)` | Service-stored only | Existing assistant workloads | Not the forward-looking default | | A2A proxy agent | A2A client/proxy agent | Remote service-managed | Calling remote agents | Not a model provider choice |