From c4c54cfc6763135848f3bbcfb43554308a2dbc59 Mon Sep 17 00:00:00 2001 From: Shawn Henry Date: Thu, 2 Apr 2026 10:03:25 -0700 Subject: [PATCH 1/9] Revise agent examples in README.md Updated examples for creating agents using OpenAI and Azure AI, and updated Important notice --- README.md | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 759f899e20..f8604a2051 100644 --- a/README.md +++ b/README.md @@ -120,23 +120,6 @@ if __name__ == "__main__": ``` ### Basic Agent - .NET - -Create a simple Agent, using OpenAI Responses, that writes a haiku about the Microsoft Agent Framework - -```c# -// dotnet add package Microsoft.Agents.AI.OpenAI --prerelease -using Microsoft.Agents.AI; -using OpenAI; -using OpenAI.Responses; - -// Replace the with your OpenAI API key. -var agent = new OpenAIClient("") - .GetResponsesClient("gpt-4o-mini") - .AsAIAgent(name: "HaikuBot", instructions: "You are an upbeat assistant that writes beautifully."); - -Console.WriteLine(await agent.RunAsync("Write a haiku about Microsoft Agent Framework.")); -``` - Create a simple Agent, using Microsoft Foundry with token-based auth, that writes a haiku about the Microsoft Agent Framework ```c# @@ -148,7 +131,7 @@ using Azure.Identity; using Microsoft.Agents.AI; var endpoint = Environment.GetEnvironmentVariable("AZURE_AI_PROJECT_ENDPOINT") ?? throw new InvalidOperationException("AZURE_AI_PROJECT_ENDPOINT is not set."); -var deploymentName = Environment.GetEnvironmentVariable("AZURE_AI_MODEL_DEPLOYMENT_NAME") ?? "gpt-4o-mini"; +var deploymentName = Environment.GetEnvironmentVariable("AZURE_AI_MODEL_DEPLOYMENT_NAME") ?? "gpt-5.3-mini"; var agent = new AIProjectClient(new Uri(endpoint), new DefaultAzureCredential()) .AsAIAgent(model: deploymentName, name: "HaikuBot", instructions: "You are an upbeat assistant that writes beautifully."); @@ -156,6 +139,22 @@ var agent = new AIProjectClient(new Uri(endpoint), new DefaultAzureCredential()) Console.WriteLine(await agent.RunAsync("Write a haiku about Microsoft Agent Framework.")); ``` +Create a simple Agent, using OpenAI Responses, that writes a haiku about the Microsoft Agent Framework + +```c# +// dotnet add package Microsoft.Agents.AI.OpenAI --prerelease +using Microsoft.Agents.AI; +using OpenAI; +using OpenAI.Responses; + +// Replace the with your OpenAI API key. +var agent = new OpenAIClient("") + .GetResponsesClient("gpt-5.3-mini") + .AsAIAgent(name: "HaikuBot", instructions: "You are an upbeat assistant that writes beautifully."); + +Console.WriteLine(await agent.RunAsync("Write a haiku about Microsoft Agent Framework.")); +``` + ## More Examples & Samples ### Python @@ -207,4 +206,9 @@ The samples typically read configuration from environment variables. Common requ ## Important Notes -If you use the Microsoft Agent Framework to build applications that operate with third-party servers or agents, you do so at your own risk. We recommend reviewing all data being shared with third-party servers or agents and being cognizant of third-party practices for retention and location of data. It is your responsibility to manage whether your data will flow outside of your organization's Azure compliance and geographic boundaries and any related implications. +> [!IMPORTANT] +> If you use Microsoft Agent Framework to build applications that operate with any third-party servers, agents, code, or non-Azure Direct models (“Third-Party Systems”), you do so at your own risk. Third-Party Systems are Non-Microsoft Products under the Microsoft Product Terms and are governed by their own third-party license terms. You are responsible for any usage and associated costs. +> +>We recommend reviewing all data being shared with and received from Third-Party Systems and being cognizant of third-party practices for handling, sharing, retention and location of data. It is your responsibility to manage whether your data will flow outside of your organization’s Azure compliance and geographic boundaries and any related implications, and that appropriate permissions, boundaries and approvals are provisioned. +> +>You are responsible for carefully reviewing and testing applications you build using Microsoft Agent Framework in the context of your specific use cases, and making all appropriate decisions and customizations. This includes implementing your own responsible AI mitigations such as metaprompt, content filters, or other safety systems, and ensuring your applications meet appropriate quality, reliability, security, and trustworthiness standards. [See also: Transparency FAQ link"] See also: [Transparency FAQ](./TRANSPARENCY_FAQ.md) From 0f13a19fefbd2cf549bbc63d741594d50614ecc0 Mon Sep 17 00:00:00 2001 From: Shawn Henry Date: Thu, 2 Apr 2026 10:21:14 -0700 Subject: [PATCH 2/9] Update README.md Co-authored-by: westey <164392973+westey-m@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f8604a2051..4f07a38369 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ using Azure.Identity; using Microsoft.Agents.AI; var endpoint = Environment.GetEnvironmentVariable("AZURE_AI_PROJECT_ENDPOINT") ?? throw new InvalidOperationException("AZURE_AI_PROJECT_ENDPOINT is not set."); -var deploymentName = Environment.GetEnvironmentVariable("AZURE_AI_MODEL_DEPLOYMENT_NAME") ?? "gpt-5.3-mini"; +var deploymentName = Environment.GetEnvironmentVariable("AZURE_AI_MODEL_DEPLOYMENT_NAME") ?? "gpt-5.4-mini"; var agent = new AIProjectClient(new Uri(endpoint), new DefaultAzureCredential()) .AsAIAgent(model: deploymentName, name: "HaikuBot", instructions: "You are an upbeat assistant that writes beautifully."); From a2faa62725ce1585a7774e21beb202d8709bbc95 Mon Sep 17 00:00:00 2001 From: Shawn Henry Date: Thu, 2 Apr 2026 10:21:25 -0700 Subject: [PATCH 3/9] Update README.md Co-authored-by: westey <164392973+westey-m@users.noreply.github.com> --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4f07a38369..89ef7052d4 100644 --- a/README.md +++ b/README.md @@ -149,8 +149,8 @@ using OpenAI.Responses; // Replace the with your OpenAI API key. var agent = new OpenAIClient("") - .GetResponsesClient("gpt-5.3-mini") - .AsAIAgent(name: "HaikuBot", instructions: "You are an upbeat assistant that writes beautifully."); + .GetResponsesClient() + .AsAIAgent(model: "gpt-5.4-mini", name: "HaikuBot", instructions: "You are an upbeat assistant that writes beautifully."); Console.WriteLine(await agent.RunAsync("Write a haiku about Microsoft Agent Framework.")); ``` From 3d149433b7ec24e0c4df798e24d4475e750a2108 Mon Sep 17 00:00:00 2001 From: Shawn Henry Date: Thu, 2 Apr 2026 10:21:41 -0700 Subject: [PATCH 4/9] Update README.md Co-authored-by: westey <164392973+westey-m@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 89ef7052d4..ee48a3eab4 100644 --- a/README.md +++ b/README.md @@ -143,7 +143,7 @@ Create a simple Agent, using OpenAI Responses, that writes a haiku about the Mic ```c# // dotnet add package Microsoft.Agents.AI.OpenAI --prerelease -using Microsoft.Agents.AI; +using System; using OpenAI; using OpenAI.Responses; From b197e97d8e67c600bd3a637efa3ca3656d1561bf Mon Sep 17 00:00:00 2001 From: Shawn Henry Date: Thu, 2 Apr 2026 10:21:53 -0700 Subject: [PATCH 5/9] Update README.md Co-authored-by: westey <164392973+westey-m@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ee48a3eab4..f3a6ec7843 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ Console.WriteLine(await agent.RunAsync("Write a haiku about Microsoft Agent Fram Create a simple Agent, using OpenAI Responses, that writes a haiku about the Microsoft Agent Framework ```c# -// dotnet add package Microsoft.Agents.AI.OpenAI --prerelease +// dotnet add package Microsoft.Agents.AI.OpenAI using System; using OpenAI; using OpenAI.Responses; From 21e7e6c034dae1e821e4f5ae3c43eb2480a34e53 Mon Sep 17 00:00:00 2001 From: Shawn Henry Date: Thu, 2 Apr 2026 10:22:09 -0700 Subject: [PATCH 6/9] Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f3a6ec7843..75ed07efd1 100644 --- a/README.md +++ b/README.md @@ -211,4 +211,4 @@ The samples typically read configuration from environment variables. Common requ > >We recommend reviewing all data being shared with and received from Third-Party Systems and being cognizant of third-party practices for handling, sharing, retention and location of data. It is your responsibility to manage whether your data will flow outside of your organization’s Azure compliance and geographic boundaries and any related implications, and that appropriate permissions, boundaries and approvals are provisioned. > ->You are responsible for carefully reviewing and testing applications you build using Microsoft Agent Framework in the context of your specific use cases, and making all appropriate decisions and customizations. This includes implementing your own responsible AI mitigations such as metaprompt, content filters, or other safety systems, and ensuring your applications meet appropriate quality, reliability, security, and trustworthiness standards. [See also: Transparency FAQ link"] See also: [Transparency FAQ](./TRANSPARENCY_FAQ.md) +>You are responsible for carefully reviewing and testing applications you build using Microsoft Agent Framework in the context of your specific use cases, and making all appropriate decisions and customizations. This includes implementing your own responsible AI mitigations such as metaprompt, content filters, or other safety systems, and ensuring your applications meet appropriate quality, reliability, security, and trustworthiness standards. See also: [Transparency FAQ](./TRANSPARENCY_FAQ.md) From 81a65dd88620e7b658424c58dc6bc681e380614c Mon Sep 17 00:00:00 2001 From: Shawn Henry Date: Thu, 2 Apr 2026 10:22:19 -0700 Subject: [PATCH 7/9] Update README.md Co-authored-by: westey <164392973+westey-m@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 75ed07efd1..5ab75e1ac3 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ Create a simple Agent, using Microsoft Foundry with token-based auth, that write ```c# // dotnet add package Microsoft.Agents.AI.AzureAI --prerelease -// dotnet add package Azure.Identity +// dotnet add package Microsoft.Agents.AI.Foundry // Use `az login` to authenticate with Azure CLI using Azure.AI.Projects; using Azure.Identity; From 288e04c0c7f78129f74bc4c2a4af2dfe5260b90f Mon Sep 17 00:00:00 2001 From: Shawn Henry Date: Thu, 2 Apr 2026 10:22:28 -0700 Subject: [PATCH 8/9] Update README.md Co-authored-by: westey <164392973+westey-m@users.noreply.github.com> --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5ab75e1ac3..643485e9ea 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,9 @@ Create a simple Agent, using Microsoft Foundry with token-based auth, that write // Use `az login` to authenticate with Azure CLI using Azure.AI.Projects; using Azure.Identity; -using Microsoft.Agents.AI; +using System; +using Azure.AI.Projects; +using Azure.Identity; var endpoint = Environment.GetEnvironmentVariable("AZURE_AI_PROJECT_ENDPOINT") ?? throw new InvalidOperationException("AZURE_AI_PROJECT_ENDPOINT is not set."); var deploymentName = Environment.GetEnvironmentVariable("AZURE_AI_MODEL_DEPLOYMENT_NAME") ?? "gpt-5.4-mini"; From 1ab800435b4d2cf1e0844f2b2caa652576aa3211 Mon Sep 17 00:00:00 2001 From: Shawn Henry Date: Mon, 6 Apr 2026 13:01:49 -0700 Subject: [PATCH 9/9] Update README.md Co-authored-by: westey <164392973+westey-m@users.noreply.github.com> --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 643485e9ea..b271a7e94f 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,6 @@ if __name__ == "__main__": Create a simple Agent, using Microsoft Foundry with token-based auth, that writes a haiku about the Microsoft Agent Framework ```c# -// dotnet add package Microsoft.Agents.AI.AzureAI --prerelease // dotnet add package Microsoft.Agents.AI.Foundry // Use `az login` to authenticate with Azure CLI using Azure.AI.Projects;