diff --git a/dotnet/agent-framework-dotnet.slnx b/dotnet/agent-framework-dotnet.slnx
index 9801ccc105..7953dc5188 100644
--- a/dotnet/agent-framework-dotnet.slnx
+++ b/dotnet/agent-framework-dotnet.slnx
@@ -119,6 +119,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dotnet/samples/02-agents/Agents/Agent_Step15_DeepResearch/Program.cs b/dotnet/samples/02-agents/Agents/Agent_Step15_DeepResearch/Program.cs
index cbbc327948..4278c301af 100644
--- a/dotnet/samples/02-agents/Agents/Agent_Step15_DeepResearch/Program.cs
+++ b/dotnet/samples/02-agents/Agents/Agent_Step15_DeepResearch/Program.cs
@@ -16,10 +16,7 @@
persistentAgentsClientOptions.Retry.NetworkTimeout = TimeSpan.FromMinutes(20);
// Get a client to create/retrieve server side agents with.
-// 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.
-PersistentAgentsClient persistentAgentsClient = new(endpoint, new DefaultAzureCredential(), persistentAgentsClientOptions);
+PersistentAgentsClient persistentAgentsClient = new(endpoint, new AzureCliCredential(), persistentAgentsClientOptions);
// Define and configure the Deep Research tool.
DeepResearchToolDefinition deepResearchTool = new(new DeepResearchDetails(
diff --git a/dotnet/samples/02-agents/Agents/Agent_Step15_DeepResearch/README.md b/dotnet/samples/02-agents/Agents/Agent_Step15_DeepResearch/README.md
index dc24ba4554..1848b10826 100644
--- a/dotnet/samples/02-agents/Agents/Agent_Step15_DeepResearch/README.md
+++ b/dotnet/samples/02-agents/Agents/Agent_Step15_DeepResearch/README.md
@@ -23,12 +23,14 @@ Before running this sample, ensure you have:
Pay special attention to the purple `Note` boxes in the Azure documentation.
-**Note**: The Bing Connection ID must be from the **project**, not the resource. It has the following format:
+**Note**: The Bing Grounding Connection ID must be the **full ARM resource URI** from the project, not just the connection name. It has the following format:
```
-/subscriptions//resourceGroups//providers//accounts//projects//connections/
+/subscriptions//resourceGroups//providers/Microsoft.CognitiveServices/accounts//projects//connections/
```
+You can find this in the Azure AI Foundry portal under **Management > Connected resources**, or retrieve it programmatically via the connections API (`.id` property).
+
## Environment Variables
Set the following environment variables:
@@ -37,8 +39,8 @@ Set the following environment variables:
# Replace with your Azure AI Foundry project endpoint
$env:AZURE_AI_PROJECT_ENDPOINT="https://your-project.services.ai.azure.com/"
-# Replace with your Bing connection ID from the project
-$env:AZURE_AI_BING_CONNECTION_ID="/subscriptions/.../connections/your-bing-connection"
+# Replace with your Bing Grounding connection ID (full ARM resource URI)
+$env:AZURE_AI_BING_CONNECTION_ID="/subscriptions//resourceGroups//providers/Microsoft.CognitiveServices/accounts//projects//connections/"
# Optional, defaults to o3-deep-research
$env:AZURE_AI_REASONING_DEPLOYMENT_NAME="o3-deep-research"
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step01_Basics/FoundryAgentsRAPI_Step01_Basics.csproj b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step01_Basics/FoundryAgentsRAPI_Step01_Basics.csproj
new file mode 100644
index 0000000000..5e73fd236a
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step01_Basics/FoundryAgentsRAPI_Step01_Basics.csproj
@@ -0,0 +1,15 @@
+
+
+
+ Exe
+ net10.0
+
+ enable
+ enable
+
+
+
+
+
+
+
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step01_Basics/Program.cs b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step01_Basics/Program.cs
new file mode 100644
index 0000000000..d59015e6b3
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step01_Basics/Program.cs
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft. All rights reserved.
+
+// This sample shows how to create and run a basic agent using the Foundry Responses API directly,
+// without creating a server-side agent definition.
+
+using Azure.Identity;
+using Microsoft.Agents.AI.AzureAI;
+
+string endpoint = Environment.GetEnvironmentVariable("AZURE_AI_PROJECT_ENDPOINT") ?? throw new InvalidOperationException("AZURE_AI_PROJECT_ENDPOINT is not set.");
+string deploymentName = Environment.GetEnvironmentVariable("AZURE_AI_MODEL_DEPLOYMENT_NAME") ?? "gpt-4o-mini";
+
+// Create a FoundryAgentClient that uses the Responses API directly.
+// No server-side agent is created — instructions and model are provided locally.
+FoundryAgentClient agent = new(
+ endpoint: new Uri(endpoint),
+ tokenProvider: new DefaultAzureCredential(),
+ model: deploymentName,
+ instructions: "You are good at telling jokes.",
+ name: "JokerAgent");
+
+// Once you have the agent, you can invoke it like any other AIAgent.
+Console.WriteLine(await agent.RunAsync("Tell me a joke about a pirate."));
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step01_Basics/README.md b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step01_Basics/README.md
new file mode 100644
index 0000000000..301e8c4258
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step01_Basics/README.md
@@ -0,0 +1,37 @@
+# Creating and Running a Basic Agent with the Responses API
+
+This sample demonstrates how to create and run a basic AI agent using the `FoundryAgentClient`, which uses the Azure AI Foundry Responses API directly without creating server-side agent definitions.
+
+## What this sample demonstrates
+
+- Creating a `FoundryAgentClient` with instructions and a model
+- Running a simple single-turn conversation
+- No server-side agent creation or cleanup required
+
+## Prerequisites
+
+Before you begin, ensure you have the following prerequisites:
+
+- .NET 10 SDK or later
+- Azure Foundry service endpoint and deployment configured
+- Azure CLI installed and authenticated (for Azure credential authentication)
+
+**Note**: This demo uses Azure CLI credentials for authentication. Make sure you're logged in with `az login` and have access to the Azure Foundry resource. For more information, see the [Azure CLI documentation](https://learn.microsoft.com/cli/azure/authenticate-azure-cli-interactively).
+
+Set the following environment variables:
+
+```powershell
+$env:AZURE_AI_PROJECT_ENDPOINT="https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project"
+$env:AZURE_AI_MODEL_DEPLOYMENT_NAME="gpt-4o-mini"
+```
+
+The `FoundryAgentClient` auto-discovers these environment variables — no endpoint or credential code is needed in the sample.
+
+## Run the sample
+
+Navigate to the FoundryAgents-RAPI sample directory and run:
+
+```powershell
+cd dotnet/samples/02-agents/FoundryAgents-RAPI
+dotnet run --project .\FoundryAgentsRAPI_Step01_Basics
+```
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step02_MultiturnConversation/FoundryAgentsRAPI_Step02_MultiturnConversation.csproj b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step02_MultiturnConversation/FoundryAgentsRAPI_Step02_MultiturnConversation.csproj
new file mode 100644
index 0000000000..5e73fd236a
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step02_MultiturnConversation/FoundryAgentsRAPI_Step02_MultiturnConversation.csproj
@@ -0,0 +1,15 @@
+
+
+
+ Exe
+ net10.0
+
+ enable
+ enable
+
+
+
+
+
+
+
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step02_MultiturnConversation/Program.cs b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step02_MultiturnConversation/Program.cs
new file mode 100644
index 0000000000..18bd898c42
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step02_MultiturnConversation/Program.cs
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft. All rights reserved.
+
+// This sample shows how to create and use a multi-turn conversation agent using the Foundry Responses API directly.
+
+using Azure.Identity;
+using Microsoft.Agents.AI;
+using Microsoft.Agents.AI.AzureAI;
+
+string endpoint = Environment.GetEnvironmentVariable("AZURE_AI_PROJECT_ENDPOINT") ?? throw new InvalidOperationException("AZURE_AI_PROJECT_ENDPOINT is not set.");
+string deploymentName = Environment.GetEnvironmentVariable("AZURE_AI_MODEL_DEPLOYMENT_NAME") ?? "gpt-4o-mini";
+
+// Create a FoundryAgentClient that uses the Responses API directly.
+// No server-side agent is created — instructions and model are provided locally.
+FoundryAgentClient agent = new(
+ endpoint: new Uri(endpoint),
+ tokenProvider: new DefaultAzureCredential(),
+ model: deploymentName,
+ instructions: "You are good at telling jokes.",
+ name: "JokerAgent");
+
+// Invoke the agent with a multi-turn conversation, where the context is preserved in the session object.
+AgentSession session = await agent.CreateSessionAsync();
+
+Console.WriteLine(await agent.RunAsync("Tell me a joke about a pirate.", session));
+Console.WriteLine(await agent.RunAsync("Now add some emojis to the joke and tell it in the voice of a pirate's parrot.", session));
+
+// Invoke the agent with a multi-turn conversation and streaming, where the context is preserved in the session object.
+session = await agent.CreateSessionAsync();
+await foreach (AgentResponseUpdate update in agent.RunStreamingAsync("Tell me a joke about a pirate.", session))
+{
+ Console.Write(update);
+}
+
+Console.WriteLine();
+
+await foreach (AgentResponseUpdate update in agent.RunStreamingAsync("Now add some emojis to the joke and tell it in the voice of a pirate's parrot.", session))
+{
+ Console.Write(update);
+}
+
+Console.WriteLine();
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step02_MultiturnConversation/README.md b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step02_MultiturnConversation/README.md
new file mode 100644
index 0000000000..040cc0e0df
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step02_MultiturnConversation/README.md
@@ -0,0 +1,39 @@
+# Multi-turn Conversation with the Responses API
+
+This sample demonstrates how to implement multi-turn conversations using the `FoundryAgentClient`, where context is preserved across multiple agent runs using sessions.
+
+## What this sample demonstrates
+
+- Creating a `FoundryAgentClient` with instructions
+- Using sessions to maintain conversation context across multiple runs
+- Running multi-turn conversations with text output
+- Running multi-turn conversations with streaming output
+- No server-side agent creation or cleanup required
+
+## Prerequisites
+
+Before you begin, ensure you have the following prerequisites:
+
+- .NET 10 SDK or later
+- Azure Foundry service endpoint and deployment configured
+- Azure CLI installed and authenticated (for Azure credential authentication)
+
+**Note**: This demo uses Azure CLI credentials for authentication. Make sure you're logged in with `az login` and have access to the Azure Foundry resource. For more information, see the [Azure CLI documentation](https://learn.microsoft.com/cli/azure/authenticate-azure-cli-interactively).
+
+Set the following environment variables:
+
+```powershell
+$env:AZURE_AI_PROJECT_ENDPOINT="https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project"
+$env:AZURE_AI_MODEL_DEPLOYMENT_NAME="gpt-4o-mini"
+```
+
+The `FoundryAgentClient` auto-discovers these environment variables — no endpoint or credential code is needed in the sample.
+
+## Run the sample
+
+Navigate to the FoundryAgents-RAPI sample directory and run:
+
+```powershell
+cd dotnet/samples/02-agents/FoundryAgents-RAPI
+dotnet run --project .\FoundryAgentsRAPI_Step02_MultiturnConversation
+```
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step03_UsingFunctionTools/FoundryAgentsRAPI_Step03_UsingFunctionTools.csproj b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step03_UsingFunctionTools/FoundryAgentsRAPI_Step03_UsingFunctionTools.csproj
new file mode 100644
index 0000000000..5e73fd236a
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step03_UsingFunctionTools/FoundryAgentsRAPI_Step03_UsingFunctionTools.csproj
@@ -0,0 +1,15 @@
+
+
+
+ Exe
+ net10.0
+
+ enable
+ enable
+
+
+
+
+
+
+
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step03_UsingFunctionTools/Program.cs b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step03_UsingFunctionTools/Program.cs
new file mode 100644
index 0000000000..5f5f2cccc9
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step03_UsingFunctionTools/Program.cs
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft. All rights reserved.
+
+// This sample demonstrates how to use function tools with the Foundry Responses API directly.
+
+using System.ComponentModel;
+using Azure.Identity;
+using Microsoft.Agents.AI;
+using Microsoft.Agents.AI.AzureAI;
+using Microsoft.Extensions.AI;
+
+string endpoint = Environment.GetEnvironmentVariable("AZURE_AI_PROJECT_ENDPOINT") ?? throw new InvalidOperationException("AZURE_AI_PROJECT_ENDPOINT is not set.");
+string deploymentName = Environment.GetEnvironmentVariable("AZURE_AI_MODEL_DEPLOYMENT_NAME") ?? "gpt-4o-mini";
+
+[Description("Get the weather for a given location.")]
+static string GetWeather([Description("The location to get the weather for.")] string location)
+ => $"The weather in {location} is cloudy with a high of 15°C.";
+
+// Define the function tool.
+AITool tool = AIFunctionFactory.Create(GetWeather);
+
+// Create a FoundryAgentClient that uses the Responses API directly with function tools.
+FoundryAgentClient agent = new(
+ endpoint: new Uri(endpoint),
+ tokenProvider: new DefaultAzureCredential(),
+ model: deploymentName,
+ instructions: "You are a helpful assistant that can get weather information.",
+ name: "WeatherAssistant",
+ tools: [tool]);
+
+// Non-streaming agent interaction with function tools.
+AgentSession session = await agent.CreateSessionAsync();
+Console.WriteLine(await agent.RunAsync("What is the weather like in Amsterdam?", session));
+
+// Streaming agent interaction with function tools.
+session = await agent.CreateSessionAsync();
+await foreach (AgentResponseUpdate update in agent.RunStreamingAsync("What is the weather like in Amsterdam?", session))
+{
+ Console.Write(update);
+}
+
+Console.WriteLine();
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step03_UsingFunctionTools/README.md b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step03_UsingFunctionTools/README.md
new file mode 100644
index 0000000000..3992d416de
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step03_UsingFunctionTools/README.md
@@ -0,0 +1,39 @@
+# Using Function Tools with the Responses API
+
+This sample demonstrates how to use function tools with the `FoundryAgentClient`, allowing the agent to call custom functions to retrieve information.
+
+## What this sample demonstrates
+
+- Creating function tools using `AIFunctionFactory`
+- Passing function tools to a `FoundryAgentClient`
+- Running agents with function tools (text output)
+- Running agents with function tools (streaming output)
+- No server-side agent creation or cleanup required
+
+## Prerequisites
+
+Before you begin, ensure you have the following prerequisites:
+
+- .NET 10 SDK or later
+- Azure Foundry service endpoint and deployment configured
+- Azure CLI installed and authenticated (for Azure credential authentication)
+
+**Note**: This demo uses Azure CLI credentials for authentication. Make sure you're logged in with `az login` and have access to the Azure Foundry resource. For more information, see the [Azure CLI documentation](https://learn.microsoft.com/cli/azure/authenticate-azure-cli-interactively).
+
+Set the following environment variables:
+
+```powershell
+$env:AZURE_AI_PROJECT_ENDPOINT="https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project"
+$env:AZURE_AI_MODEL_DEPLOYMENT_NAME="gpt-4o-mini"
+```
+
+The `FoundryAgentClient` auto-discovers these environment variables — no endpoint or credential code is needed in the sample.
+
+## Run the sample
+
+Navigate to the FoundryAgents-RAPI sample directory and run:
+
+```powershell
+cd dotnet/samples/02-agents/FoundryAgents-RAPI
+dotnet run --project .\FoundryAgentsRAPI_Step03_UsingFunctionTools
+```
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step04_UsingFunctionToolsWithApprovals/FoundryAgentsRAPI_Step04_UsingFunctionToolsWithApprovals.csproj b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step04_UsingFunctionToolsWithApprovals/FoundryAgentsRAPI_Step04_UsingFunctionToolsWithApprovals.csproj
new file mode 100644
index 0000000000..5e73fd236a
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step04_UsingFunctionToolsWithApprovals/FoundryAgentsRAPI_Step04_UsingFunctionToolsWithApprovals.csproj
@@ -0,0 +1,15 @@
+
+
+
+ Exe
+ net10.0
+
+ enable
+ enable
+
+
+
+
+
+
+
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step04_UsingFunctionToolsWithApprovals/Program.cs b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step04_UsingFunctionToolsWithApprovals/Program.cs
new file mode 100644
index 0000000000..b7c4539707
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step04_UsingFunctionToolsWithApprovals/Program.cs
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft. All rights reserved.
+
+// This sample demonstrates how to use an agent with function tools that require a human in the loop for approvals.
+
+using System.ComponentModel;
+using Azure.Identity;
+using Microsoft.Agents.AI;
+using Microsoft.Agents.AI.AzureAI;
+using Microsoft.Extensions.AI;
+
+string endpoint = Environment.GetEnvironmentVariable("AZURE_AI_PROJECT_ENDPOINT") ?? throw new InvalidOperationException("AZURE_AI_PROJECT_ENDPOINT is not set.");
+string deploymentName = Environment.GetEnvironmentVariable("AZURE_AI_MODEL_DEPLOYMENT_NAME") ?? "gpt-4o-mini";
+
+[Description("Get the weather for a given location.")]
+static string GetWeather([Description("The location to get the weather for.")] string location)
+ => $"The weather in {location} is cloudy with a high of 15°C.";
+
+ApprovalRequiredAIFunction approvalTool = new(AIFunctionFactory.Create(GetWeather, name: nameof(GetWeather)));
+
+FoundryAgentClient agent = new(
+ endpoint: new Uri(endpoint),
+ tokenProvider: new DefaultAzureCredential(),
+ model: deploymentName,
+ instructions: "You are a helpful assistant that can get weather information.",
+ name: "WeatherAssistant",
+ tools: [approvalTool]);
+
+// Call the agent with approval-required function tools.
+AgentSession session = await agent.CreateSessionAsync();
+AgentResponse response = await agent.RunAsync("What is the weather like in Amsterdam?", session);
+
+// Check if there are any approval requests.
+List approvalRequests = response.Messages.SelectMany(m => m.Contents).OfType().ToList();
+
+while (approvalRequests.Count > 0)
+{
+ // Ask the user to approve each function call request.
+ List userInputMessages = approvalRequests
+ .ConvertAll(functionApprovalRequest =>
+ {
+ Console.WriteLine($"The agent would like to invoke the following function, please reply Y to approve: Name {functionApprovalRequest.FunctionCall.Name}");
+ bool approved = Console.ReadLine()?.Equals("Y", StringComparison.OrdinalIgnoreCase) ?? false;
+ return new ChatMessage(ChatRole.User, [functionApprovalRequest.CreateResponse(approved)]);
+ });
+
+ response = await agent.RunAsync(userInputMessages, session);
+ approvalRequests = response.Messages.SelectMany(m => m.Contents).OfType().ToList();
+}
+
+Console.WriteLine($"\nAgent: {response}");
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step04_UsingFunctionToolsWithApprovals/README.md b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step04_UsingFunctionToolsWithApprovals/README.md
new file mode 100644
index 0000000000..cd816f55a6
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step04_UsingFunctionToolsWithApprovals/README.md
@@ -0,0 +1,30 @@
+# Using Function Tools with Approvals via the Responses API
+
+This sample demonstrates how to use function tools that require human-in-the-loop approval before execution.
+
+## What this sample demonstrates
+
+- Creating function tools that require approval using `ApprovalRequiredAIFunction`
+- Handling approval requests from the agent
+- Passing approval responses back to the agent
+- No server-side agent creation or cleanup required
+
+## Prerequisites
+
+- .NET 10 SDK or later
+- Azure Foundry service endpoint and deployment configured
+- Azure CLI installed and authenticated (`az login`)
+
+Set the following environment variables:
+
+```powershell
+$env:AZURE_AI_PROJECT_ENDPOINT="https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project"
+$env:AZURE_AI_MODEL_DEPLOYMENT_NAME="gpt-4o-mini"
+```
+
+## Run the sample
+
+```powershell
+cd dotnet/samples/02-agents/FoundryAgents-RAPI
+dotnet run --project .\FoundryAgentsRAPI_Step04_UsingFunctionToolsWithApprovals
+```
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step05_StructuredOutput/FoundryAgentsRAPI_Step05_StructuredOutput.csproj b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step05_StructuredOutput/FoundryAgentsRAPI_Step05_StructuredOutput.csproj
new file mode 100644
index 0000000000..5e73fd236a
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step05_StructuredOutput/FoundryAgentsRAPI_Step05_StructuredOutput.csproj
@@ -0,0 +1,15 @@
+
+
+
+ Exe
+ net10.0
+
+ enable
+ enable
+
+
+
+
+
+
+
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step05_StructuredOutput/Program.cs b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step05_StructuredOutput/Program.cs
new file mode 100644
index 0000000000..0bc79dbc20
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step05_StructuredOutput/Program.cs
@@ -0,0 +1,69 @@
+// Copyright (c) Microsoft. All rights reserved.
+
+// This sample shows how to configure an agent to produce structured output using the Responses API directly.
+
+using System.ComponentModel;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Azure.Identity;
+using Microsoft.Agents.AI;
+using Microsoft.Agents.AI.AzureAI;
+using SampleApp;
+
+#pragma warning disable CA5399
+
+string endpoint = Environment.GetEnvironmentVariable("AZURE_AI_PROJECT_ENDPOINT") ?? throw new InvalidOperationException("AZURE_AI_PROJECT_ENDPOINT is not set.");
+string deploymentName = Environment.GetEnvironmentVariable("AZURE_AI_MODEL_DEPLOYMENT_NAME") ?? "gpt-4o-mini";
+
+FoundryAgentClient agent = new(
+ endpoint: new Uri(endpoint),
+ tokenProvider: new DefaultAzureCredential(),
+ options: new ChatClientAgentOptions
+ {
+ Name = "StructuredOutputAssistant",
+ ChatOptions = new()
+ {
+ ModelId = deploymentName,
+ Instructions = "You are a helpful assistant that extracts structured information about people.",
+ ResponseFormat = Microsoft.Extensions.AI.ChatResponseFormat.ForJsonSchema()
+ }
+ });
+
+// Set PersonInfo as the type parameter of RunAsync method to specify the expected structured output.
+AgentResponse response = await agent.RunAsync("Please provide information about John Smith, who is a 35-year-old software engineer.");
+
+// Access the structured output via the Result property of the agent response.
+Console.WriteLine("Assistant Output:");
+Console.WriteLine($"Name: {response.Result.Name}");
+Console.WriteLine($"Age: {response.Result.Age}");
+Console.WriteLine($"Occupation: {response.Result.Occupation}");
+
+// Invoke the agent with streaming support, then deserialize the assembled response.
+IAsyncEnumerable updates = agent.RunStreamingAsync("Please provide information about Jane Doe, who is a 28-year-old data scientist.");
+
+PersonInfo personInfo = JsonSerializer.Deserialize((await updates.ToAgentResponseAsync()).Text, JsonSerializerOptions.Web)
+ ?? throw new InvalidOperationException("Failed to deserialize the streamed response into PersonInfo.");
+
+Console.WriteLine("\nStreaming Assistant Output:");
+Console.WriteLine($"Name: {personInfo.Name}");
+Console.WriteLine($"Age: {personInfo.Age}");
+Console.WriteLine($"Occupation: {personInfo.Occupation}");
+
+namespace SampleApp
+{
+ ///
+ /// Represents information about a person.
+ ///
+ [Description("Information about a person including their name, age, and occupation")]
+ public class PersonInfo
+ {
+ [JsonPropertyName("name")]
+ public string? Name { get; set; }
+
+ [JsonPropertyName("age")]
+ public int? Age { get; set; }
+
+ [JsonPropertyName("occupation")]
+ public string? Occupation { get; set; }
+ }
+}
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step05_StructuredOutput/README.md b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step05_StructuredOutput/README.md
new file mode 100644
index 0000000000..05ea8e7481
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step05_StructuredOutput/README.md
@@ -0,0 +1,29 @@
+# Structured Output with the Responses API
+
+This sample demonstrates how to configure an agent to produce structured output using JSON schema.
+
+## What this sample demonstrates
+
+- Using `RunAsync()` to get typed structured output from the agent
+- Deserializing streamed responses into structured types
+- No server-side agent creation or cleanup required
+
+## Prerequisites
+
+- .NET 10 SDK or later
+- Azure Foundry service endpoint and deployment configured
+- Azure CLI installed and authenticated (`az login`)
+
+Set the following environment variables:
+
+```powershell
+$env:AZURE_AI_PROJECT_ENDPOINT="https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project"
+$env:AZURE_AI_MODEL_DEPLOYMENT_NAME="gpt-4o-mini"
+```
+
+## Run the sample
+
+```powershell
+cd dotnet/samples/02-agents/FoundryAgents-RAPI
+dotnet run --project .\FoundryAgentsRAPI_Step05_StructuredOutput
+```
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step06_PersistedConversations/FoundryAgentsRAPI_Step06_PersistedConversations.csproj b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step06_PersistedConversations/FoundryAgentsRAPI_Step06_PersistedConversations.csproj
new file mode 100644
index 0000000000..5e73fd236a
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step06_PersistedConversations/FoundryAgentsRAPI_Step06_PersistedConversations.csproj
@@ -0,0 +1,15 @@
+
+
+
+ Exe
+ net10.0
+
+ enable
+ enable
+
+
+
+
+
+
+
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step06_PersistedConversations/Program.cs b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step06_PersistedConversations/Program.cs
new file mode 100644
index 0000000000..156ced748c
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step06_PersistedConversations/Program.cs
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft. All rights reserved.
+
+// This sample shows how to persist and resume conversations using the Responses API directly.
+
+using System.Text.Json;
+using Azure.Identity;
+using Microsoft.Agents.AI;
+using Microsoft.Agents.AI.AzureAI;
+
+string endpoint = Environment.GetEnvironmentVariable("AZURE_AI_PROJECT_ENDPOINT") ?? throw new InvalidOperationException("AZURE_AI_PROJECT_ENDPOINT is not set.");
+string deploymentName = Environment.GetEnvironmentVariable("AZURE_AI_MODEL_DEPLOYMENT_NAME") ?? "gpt-4o-mini";
+
+FoundryAgentClient agent = new(
+ endpoint: new Uri(endpoint),
+ tokenProvider: new DefaultAzureCredential(),
+ model: deploymentName,
+ instructions: "You are good at telling jokes.",
+ name: "JokerAgent");
+
+// Start a new session for the agent conversation.
+AgentSession session = await agent.CreateSessionAsync();
+
+// Run the agent with a new session.
+Console.WriteLine(await agent.RunAsync("Tell me a joke about a pirate.", session));
+
+// Serialize the session state to a JsonElement, so it can be stored for later use.
+JsonElement serializedSession = await agent.SerializeSessionAsync(session);
+
+// Save the serialized session to a temporary file (for demonstration purposes).
+string tempFilePath = Path.GetTempFileName();
+await File.WriteAllTextAsync(tempFilePath, JsonSerializer.Serialize(serializedSession));
+
+// Load the serialized session from the temporary file (for demonstration purposes).
+JsonElement reloadedSerializedSession = JsonElement.Parse(await File.ReadAllTextAsync(tempFilePath))!;
+
+// Deserialize the session state after loading from storage.
+AgentSession resumedSession = await agent.DeserializeSessionAsync(reloadedSerializedSession);
+
+// Run the agent again with the resumed session.
+Console.WriteLine(await agent.RunAsync("Now tell the same joke in the voice of a pirate, and add some emojis to the joke.", resumedSession));
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step06_PersistedConversations/README.md b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step06_PersistedConversations/README.md
new file mode 100644
index 0000000000..2725616fd1
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step06_PersistedConversations/README.md
@@ -0,0 +1,30 @@
+# Persisted Conversations with the Responses API
+
+This sample demonstrates how to persist and resume agent conversations using session serialization.
+
+## What this sample demonstrates
+
+- Serializing agent sessions to JSON for persistence
+- Saving and loading sessions from disk
+- Resuming conversations with preserved context
+- No server-side agent creation or cleanup required
+
+## Prerequisites
+
+- .NET 10 SDK or later
+- Azure Foundry service endpoint and deployment configured
+- Azure CLI installed and authenticated (`az login`)
+
+Set the following environment variables:
+
+```powershell
+$env:AZURE_AI_PROJECT_ENDPOINT="https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project"
+$env:AZURE_AI_MODEL_DEPLOYMENT_NAME="gpt-4o-mini"
+```
+
+## Run the sample
+
+```powershell
+cd dotnet/samples/02-agents/FoundryAgents-RAPI
+dotnet run --project .\FoundryAgentsRAPI_Step06_PersistedConversations
+```
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step07_Observability/FoundryAgentsRAPI_Step07_Observability.csproj b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step07_Observability/FoundryAgentsRAPI_Step07_Observability.csproj
new file mode 100644
index 0000000000..5350f8236d
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step07_Observability/FoundryAgentsRAPI_Step07_Observability.csproj
@@ -0,0 +1,21 @@
+
+
+
+ Exe
+ net10.0
+
+ enable
+ enable
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step07_Observability/Program.cs b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step07_Observability/Program.cs
new file mode 100644
index 0000000000..38ab9d9180
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step07_Observability/Program.cs
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft. All rights reserved.
+
+// This sample shows how to add OpenTelemetry observability to an agent using the Responses API directly.
+
+using Azure.Identity;
+using Azure.Monitor.OpenTelemetry.Exporter;
+using Microsoft.Agents.AI;
+using Microsoft.Agents.AI.AzureAI;
+using OpenTelemetry;
+using OpenTelemetry.Trace;
+
+string endpoint = Environment.GetEnvironmentVariable("AZURE_AI_PROJECT_ENDPOINT") ?? throw new InvalidOperationException("AZURE_AI_PROJECT_ENDPOINT is not set.");
+string deploymentName = Environment.GetEnvironmentVariable("AZURE_AI_MODEL_DEPLOYMENT_NAME") ?? "gpt-4o-mini";
+string? applicationInsightsConnectionString = Environment.GetEnvironmentVariable("APPLICATIONINSIGHTS_CONNECTION_STRING");
+
+// Create TracerProvider with console exporter.
+string sourceName = Guid.NewGuid().ToString("N");
+TracerProviderBuilder tracerProviderBuilder = Sdk.CreateTracerProviderBuilder()
+ .AddSource(sourceName)
+ .AddConsoleExporter();
+if (!string.IsNullOrWhiteSpace(applicationInsightsConnectionString))
+{
+ tracerProviderBuilder.AddAzureMonitorTraceExporter(options => options.ConnectionString = applicationInsightsConnectionString);
+}
+using var tracerProvider = tracerProviderBuilder.Build();
+
+// Create a FoundryAgentClient using environment variable auto-discovery.
+// AZURE_AI_PROJECT_ENDPOINT - The Azure AI Foundry project endpoint URL.
+// AZURE_AI_MODEL_DEPLOYMENT_NAME - The model deployment name to use.
+AIAgent agent = new FoundryAgentClient(
+ endpoint: new Uri(endpoint),
+ tokenProvider: new DefaultAzureCredential(),
+ model: deploymentName,
+ instructions: "You are good at telling jokes.",
+ name: "JokerAgent")
+ .AsBuilder()
+ .UseOpenTelemetry(sourceName: sourceName)
+ .Build();
+
+// Invoke the agent and output the text result.
+AgentSession session = await agent.CreateSessionAsync();
+Console.WriteLine(await agent.RunAsync("Tell me a joke about a pirate.", session));
+
+// Invoke the agent with streaming support.
+session = await agent.CreateSessionAsync();
+await foreach (AgentResponseUpdate update in agent.RunStreamingAsync("Tell me a joke about a pirate.", session))
+{
+ Console.Write(update);
+}
+
+Console.WriteLine();
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step07_Observability/README.md b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step07_Observability/README.md
new file mode 100644
index 0000000000..c173477791
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step07_Observability/README.md
@@ -0,0 +1,31 @@
+# Observability with the Responses API
+
+This sample demonstrates how to add OpenTelemetry observability to an agent using console and Azure Monitor exporters.
+
+## What this sample demonstrates
+
+- Configuring OpenTelemetry tracing with console exporter
+- Optional Azure Application Insights integration
+- Using `.AsBuilder().UseOpenTelemetry()` to add telemetry to the agent
+- No server-side agent creation or cleanup required
+
+## Prerequisites
+
+- .NET 10 SDK or later
+- Azure Foundry service endpoint and deployment configured
+- Azure CLI installed and authenticated (`az login`)
+
+Set the following environment variables:
+
+```powershell
+$env:AZURE_AI_PROJECT_ENDPOINT="https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project"
+$env:AZURE_AI_MODEL_DEPLOYMENT_NAME="gpt-4o-mini"
+$env:APPLICATIONINSIGHTS_CONNECTION_STRING="..." # Optional
+```
+
+## Run the sample
+
+```powershell
+cd dotnet/samples/02-agents/FoundryAgents-RAPI
+dotnet run --project .\FoundryAgentsRAPI_Step07_Observability
+```
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step08_DependencyInjection/FoundryAgentsRAPI_Step08_DependencyInjection.csproj b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step08_DependencyInjection/FoundryAgentsRAPI_Step08_DependencyInjection.csproj
new file mode 100644
index 0000000000..ffa39538d5
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step08_DependencyInjection/FoundryAgentsRAPI_Step08_DependencyInjection.csproj
@@ -0,0 +1,21 @@
+
+
+
+ Exe
+ net10.0
+
+ enable
+ enable
+
+ $(NoWarn);CA1812
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step08_DependencyInjection/Program.cs b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step08_DependencyInjection/Program.cs
new file mode 100644
index 0000000000..5f403ea02f
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step08_DependencyInjection/Program.cs
@@ -0,0 +1,77 @@
+// Copyright (c) Microsoft. All rights reserved.
+
+// This sample shows how to use dependency injection to register a FoundryAgentClient and use it from a hosted service.
+
+using Azure.Identity;
+using Microsoft.Agents.AI;
+using Microsoft.Agents.AI.AzureAI;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+
+string endpoint = Environment.GetEnvironmentVariable("AZURE_AI_PROJECT_ENDPOINT") ?? throw new InvalidOperationException("AZURE_AI_PROJECT_ENDPOINT is not set.");
+string deploymentName = Environment.GetEnvironmentVariable("AZURE_AI_MODEL_DEPLOYMENT_NAME") ?? "gpt-4o-mini";
+
+FoundryAgentClient agent = new(
+ endpoint: new Uri(endpoint),
+ tokenProvider: new DefaultAzureCredential(),
+ model: deploymentName,
+ instructions: "You are good at telling jokes.",
+ name: "JokerAgent");
+
+// Create a host builder that we will register services with and then run.
+HostApplicationBuilder builder = Host.CreateApplicationBuilder(args);
+
+// Add the AI agent to the service collection.
+builder.Services.AddSingleton(agent);
+
+// Add a sample service that will use the agent to respond to user input.
+builder.Services.AddHostedService();
+
+// Build and run the host.
+using IHost host = builder.Build();
+await host.RunAsync().ConfigureAwait(false);
+
+///
+/// A sample service that uses an AI agent to respond to user input.
+///
+internal sealed class SampleService(AIAgent agent, IHostApplicationLifetime appLifetime) : IHostedService
+{
+ private AgentSession? _session;
+
+ public async Task StartAsync(CancellationToken cancellationToken)
+ {
+ this._session = await agent.CreateSessionAsync(cancellationToken);
+ _ = this.RunAsync(appLifetime.ApplicationStopping);
+ }
+
+ public async Task RunAsync(CancellationToken cancellationToken)
+ {
+ await Task.Delay(100, cancellationToken);
+
+ while (!cancellationToken.IsCancellationRequested)
+ {
+ Console.WriteLine("\nAgent: Ask me to tell you a joke about a specific topic. To exit just press Ctrl+C or enter without any input.\n");
+ Console.Write("> ");
+ string? input = Console.ReadLine();
+
+ if (string.IsNullOrWhiteSpace(input))
+ {
+ appLifetime.StopApplication();
+ break;
+ }
+
+ await foreach (AgentResponseUpdate update in agent.RunStreamingAsync(input, this._session, cancellationToken: cancellationToken))
+ {
+ Console.Write(update);
+ }
+
+ Console.WriteLine();
+ }
+ }
+
+ public Task StopAsync(CancellationToken cancellationToken)
+ {
+ Console.WriteLine("\nShutting down...");
+ return Task.CompletedTask;
+ }
+}
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step08_DependencyInjection/README.md b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step08_DependencyInjection/README.md
new file mode 100644
index 0000000000..d27e091f28
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step08_DependencyInjection/README.md
@@ -0,0 +1,30 @@
+# Dependency Injection with the Responses API
+
+This sample demonstrates how to register a `FoundryAgentClient` in a dependency injection container and use it from a hosted service.
+
+## What this sample demonstrates
+
+- Registering `FoundryAgentClient` as an `AIAgent` in the service collection
+- Using the agent from a `IHostedService` with an interactive chat loop
+- Streaming responses in a hosted service context
+- No server-side agent creation or cleanup required
+
+## Prerequisites
+
+- .NET 10 SDK or later
+- Azure Foundry service endpoint and deployment configured
+- Azure CLI installed and authenticated (`az login`)
+
+Set the following environment variables:
+
+```powershell
+$env:AZURE_AI_PROJECT_ENDPOINT="https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project"
+$env:AZURE_AI_MODEL_DEPLOYMENT_NAME="gpt-4o-mini"
+```
+
+## Run the sample
+
+```powershell
+cd dotnet/samples/02-agents/FoundryAgents-RAPI
+dotnet run --project .\FoundryAgentsRAPI_Step08_DependencyInjection
+```
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step09_UsingMcpClientAsTools/FoundryAgentsRAPI_Step09_UsingMcpClientAsTools.csproj b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step09_UsingMcpClientAsTools/FoundryAgentsRAPI_Step09_UsingMcpClientAsTools.csproj
new file mode 100644
index 0000000000..a69c81f08c
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step09_UsingMcpClientAsTools/FoundryAgentsRAPI_Step09_UsingMcpClientAsTools.csproj
@@ -0,0 +1,20 @@
+
+
+
+ Exe
+ net10.0
+
+ enable
+ enable
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step09_UsingMcpClientAsTools/Program.cs b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step09_UsingMcpClientAsTools/Program.cs
new file mode 100644
index 0000000000..cb090912c1
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step09_UsingMcpClientAsTools/Program.cs
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft. All rights reserved.
+
+// This sample shows how to use MCP client tools with a FoundryAgentClient using the Responses API directly.
+
+using Azure.Identity;
+using Microsoft.Agents.AI.AzureAI;
+using Microsoft.Extensions.AI;
+using ModelContextProtocol.Client;
+
+string endpoint = Environment.GetEnvironmentVariable("AZURE_AI_PROJECT_ENDPOINT") ?? throw new InvalidOperationException("AZURE_AI_PROJECT_ENDPOINT is not set.");
+string deploymentName = Environment.GetEnvironmentVariable("AZURE_AI_MODEL_DEPLOYMENT_NAME") ?? "gpt-4o-mini";
+
+Console.WriteLine("Starting MCP Stdio for @modelcontextprotocol/server-github ... ");
+
+// Create an MCPClient for the GitHub server
+await using var mcpClient = await McpClient.CreateAsync(new StdioClientTransport(new()
+{
+ Name = "MCPServer",
+ Command = "npx",
+ Arguments = ["-y", "--verbose", "@modelcontextprotocol/server-github"],
+}));
+
+// Retrieve the list of tools available on the GitHub server
+IList mcpTools = await mcpClient.ListToolsAsync();
+
+// Create a FoundryAgentClient that uses the Responses API directly with MCP tools.
+// No server-side agent is created.
+FoundryAgentClient agent = new(
+ endpoint: new Uri(endpoint),
+ tokenProvider: new DefaultAzureCredential(),
+ model: deploymentName,
+ instructions: "You answer questions related to GitHub repositories only.",
+ name: "AgentWithMCP",
+ tools: [.. mcpTools.Cast()]);
+
+string prompt = "Summarize the last four commits to the microsoft/semantic-kernel repository?";
+
+Console.WriteLine($"Invoking agent '{agent.Name}' with prompt: {prompt} ...");
+
+// Invoke the agent and output the text result.
+Console.WriteLine(await agent.RunAsync(prompt));
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step09_UsingMcpClientAsTools/README.md b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step09_UsingMcpClientAsTools/README.md
new file mode 100644
index 0000000000..741ce4519d
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step09_UsingMcpClientAsTools/README.md
@@ -0,0 +1,29 @@
+# Using MCP Client as Tools with the Responses API
+
+This sample shows how to use MCP (Model Context Protocol) client tools with a `FoundryAgentClient` using the Responses API directly.
+
+## What this sample demonstrates
+
+- Connecting to an MCP server (GitHub) via stdio transport
+- Retrieving MCP tools and passing them to a `FoundryAgentClient`
+- Using MCP tools for agent interactions without server-side agent creation
+
+## Prerequisites
+
+- .NET 10 SDK or later
+- Azure Foundry service endpoint and deployment configured
+- Azure CLI installed and authenticated (`az login`)
+- Node.js installed (for npx/MCP server)
+
+Set the following environment variables:
+
+```powershell
+$env:AZURE_AI_PROJECT_ENDPOINT="https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project"
+$env:AZURE_AI_MODEL_DEPLOYMENT_NAME="gpt-4o-mini"
+```
+
+## Run the sample
+
+```powershell
+dotnet run
+```
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step10_UsingImages/FoundryAgentsRAPI_Step10_UsingImages.csproj b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step10_UsingImages/FoundryAgentsRAPI_Step10_UsingImages.csproj
new file mode 100644
index 0000000000..91ad19c6ab
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step10_UsingImages/FoundryAgentsRAPI_Step10_UsingImages.csproj
@@ -0,0 +1,21 @@
+
+
+
+ Exe
+ net10.0
+
+ enable
+ enable
+
+
+
+
+
+
+
+
+ PreserveNewest
+
+
+
+
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step10_UsingImages/Program.cs b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step10_UsingImages/Program.cs
new file mode 100644
index 0000000000..4500eb1a97
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step10_UsingImages/Program.cs
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft. All rights reserved.
+
+// This sample shows how to use image multi-modality with an agent using the Responses API directly.
+
+using Azure.Identity;
+using Microsoft.Agents.AI;
+using Microsoft.Agents.AI.AzureAI;
+using Microsoft.Extensions.AI;
+
+string endpoint = Environment.GetEnvironmentVariable("AZURE_AI_PROJECT_ENDPOINT") ?? throw new InvalidOperationException("AZURE_AI_PROJECT_ENDPOINT is not set.");
+string deploymentName = Environment.GetEnvironmentVariable("AZURE_AI_MODEL_DEPLOYMENT_NAME") ?? "gpt-4o";
+
+FoundryAgentClient agent = new(
+ endpoint: new Uri(endpoint),
+ tokenProvider: new DefaultAzureCredential(),
+ model: deploymentName,
+ instructions: "You are a helpful agent that can analyze images.",
+ name: "VisionAgent");
+
+ChatMessage message = new(ChatRole.User, [
+ new TextContent("What do you see in this image?"),
+ await DataContent.LoadFromAsync("assets/walkway.jpg"),
+]);
+
+AgentSession session = await agent.CreateSessionAsync();
+
+await foreach (AgentResponseUpdate update in agent.RunStreamingAsync(message, session))
+{
+ Console.Write(update);
+}
+
+Console.WriteLine();
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step10_UsingImages/README.md b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step10_UsingImages/README.md
new file mode 100644
index 0000000000..2f80ac87df
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step10_UsingImages/README.md
@@ -0,0 +1,30 @@
+# Using Images with the Responses API
+
+This sample demonstrates how to use image multi-modality with an agent.
+
+## What this sample demonstrates
+
+- Loading images using `DataContent.LoadFromAsync`
+- Sending images alongside text to the agent
+- Streaming the agent's image analysis response
+- No server-side agent creation or cleanup required
+
+## Prerequisites
+
+- .NET 10 SDK or later
+- Azure Foundry service endpoint and a vision-capable model deployment (e.g., `gpt-4o`)
+- Azure CLI installed and authenticated (`az login`)
+
+Set the following environment variables:
+
+```powershell
+$env:AZURE_AI_PROJECT_ENDPOINT="https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project"
+$env:AZURE_AI_MODEL_DEPLOYMENT_NAME="gpt-4o"
+```
+
+## Run the sample
+
+```powershell
+cd dotnet/samples/02-agents/FoundryAgents-RAPI
+dotnet run --project .\FoundryAgentsRAPI_Step10_UsingImages
+```
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step10_UsingImages/assets/walkway.jpg b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step10_UsingImages/assets/walkway.jpg
new file mode 100644
index 0000000000..13ef1e1840
Binary files /dev/null and b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step10_UsingImages/assets/walkway.jpg differ
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step11_AsFunctionTool/FoundryAgentsRAPI_Step11_AsFunctionTool.csproj b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step11_AsFunctionTool/FoundryAgentsRAPI_Step11_AsFunctionTool.csproj
new file mode 100644
index 0000000000..5e73fd236a
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step11_AsFunctionTool/FoundryAgentsRAPI_Step11_AsFunctionTool.csproj
@@ -0,0 +1,15 @@
+
+
+
+ Exe
+ net10.0
+
+ enable
+ enable
+
+
+
+
+
+
+
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step11_AsFunctionTool/Program.cs b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step11_AsFunctionTool/Program.cs
new file mode 100644
index 0000000000..989a90da56
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step11_AsFunctionTool/Program.cs
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft. All rights reserved.
+
+// This sample shows how to use one agent as a function tool for another agent using the Responses API directly.
+
+using System.ComponentModel;
+using Azure.Identity;
+using Microsoft.Agents.AI;
+using Microsoft.Agents.AI.AzureAI;
+using Microsoft.Extensions.AI;
+
+string endpoint = Environment.GetEnvironmentVariable("AZURE_AI_PROJECT_ENDPOINT") ?? throw new InvalidOperationException("AZURE_AI_PROJECT_ENDPOINT is not set.");
+string deploymentName = Environment.GetEnvironmentVariable("AZURE_AI_MODEL_DEPLOYMENT_NAME") ?? "gpt-4o-mini";
+
+[Description("Get the weather for a given location.")]
+static string GetWeather([Description("The location to get the weather for.")] string location)
+ => $"The weather in {location} is cloudy with a high of 15°C.";
+
+AITool weatherTool = AIFunctionFactory.Create(GetWeather);
+FoundryAgentClient weatherAgent = new(
+ endpoint: new Uri(endpoint),
+ tokenProvider: new DefaultAzureCredential(),
+ model: deploymentName,
+ instructions: "You answer questions about the weather.",
+ name: "WeatherAgent",
+ tools: [weatherTool]);
+
+FoundryAgentClient agent = new(
+ endpoint: new Uri(endpoint),
+ tokenProvider: new DefaultAzureCredential(),
+ model: deploymentName,
+ instructions: "You are a helpful assistant who responds in French.",
+ name: "MainAgent",
+ tools: [weatherAgent.AsAIFunction()]);
+
+// Invoke the agent and output the text result.
+AgentSession session = await agent.CreateSessionAsync();
+Console.WriteLine(await agent.RunAsync("What is the weather like in Amsterdam?", session));
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step11_AsFunctionTool/README.md b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step11_AsFunctionTool/README.md
new file mode 100644
index 0000000000..ee18e9e6d4
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step11_AsFunctionTool/README.md
@@ -0,0 +1,30 @@
+# Agent as a Function Tool with the Responses API
+
+This sample demonstrates how to use one agent as a function tool for another agent.
+
+## What this sample demonstrates
+
+- Creating a specialized agent (weather) with function tools
+- Exposing an agent as a function tool using `.AsAIFunction()`
+- Composing agents where one agent delegates to another
+- No server-side agent creation or cleanup required
+
+## Prerequisites
+
+- .NET 10 SDK or later
+- Azure Foundry service endpoint and deployment configured
+- Azure CLI installed and authenticated (`az login`)
+
+Set the following environment variables:
+
+```powershell
+$env:AZURE_AI_PROJECT_ENDPOINT="https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project"
+$env:AZURE_AI_MODEL_DEPLOYMENT_NAME="gpt-4o-mini"
+```
+
+## Run the sample
+
+```powershell
+cd dotnet/samples/02-agents/FoundryAgents-RAPI
+dotnet run --project .\FoundryAgentsRAPI_Step11_AsFunctionTool
+```
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step12_Middleware/FoundryAgentsRAPI_Step12_Middleware.csproj b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step12_Middleware/FoundryAgentsRAPI_Step12_Middleware.csproj
new file mode 100644
index 0000000000..811a1eacb6
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step12_Middleware/FoundryAgentsRAPI_Step12_Middleware.csproj
@@ -0,0 +1,19 @@
+
+
+
+ Exe
+ net10.0
+
+ enable
+ enable
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step12_Middleware/Program.cs b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step12_Middleware/Program.cs
new file mode 100644
index 0000000000..ed51d47b09
--- /dev/null
+++ b/dotnet/samples/02-agents/FoundryAgents-RAPI/FoundryAgentsRAPI_Step12_Middleware/Program.cs
@@ -0,0 +1,197 @@
+// Copyright (c) Microsoft. All rights reserved.
+
+// This sample shows multiple middleware layers working together with the Responses API:
+// agent run (PII filtering and guardrails),
+// function invocation (logging and result overrides), and human-in-the-loop
+// approval workflows for sensitive function calls.
+
+using System.ComponentModel;
+using System.Text.RegularExpressions;
+using Azure.Identity;
+using Microsoft.Agents.AI;
+using Microsoft.Agents.AI.AzureAI;
+using Microsoft.Extensions.AI;
+
+string endpoint = Environment.GetEnvironmentVariable("AZURE_AI_PROJECT_ENDPOINT") ?? throw new InvalidOperationException("AZURE_AI_PROJECT_ENDPOINT is not set.");
+string deploymentName = Environment.GetEnvironmentVariable("AZURE_AI_MODEL_DEPLOYMENT_NAME") ?? "gpt-4o-mini";
+
+[Description("Get the weather for a given location.")]
+static string GetWeather([Description("The location to get the weather for.")] string location)
+ => $"The weather in {location} is cloudy with a high of 15°C.";
+
+[Description("The current datetime offset.")]
+static string GetDateTime()
+ => DateTimeOffset.Now.ToString();
+
+AITool dateTimeTool = AIFunctionFactory.Create(GetDateTime, name: nameof(GetDateTime));
+AITool getWeatherTool = AIFunctionFactory.Create(GetWeather, name: nameof(GetWeather));
+
+FoundryAgentClient originalAgent = new(
+ endpoint: new Uri(endpoint),
+ tokenProvider: new DefaultAzureCredential(),
+ model: deploymentName,
+ instructions: "You are an AI assistant that helps people find information.",
+ name: "InformationAssistant",
+ tools: [getWeatherTool, dateTimeTool]);
+
+// Adding middleware to the agent level
+AIAgent middlewareEnabledAgent = originalAgent
+ .AsBuilder()
+ .Use(FunctionCallMiddleware)
+ .Use(FunctionCallOverrideWeather)
+ .Use(PIIMiddleware, null)
+ .Use(GuardrailMiddleware, null)
+ .Build();
+
+AgentSession session = await middlewareEnabledAgent.CreateSessionAsync();
+
+Console.WriteLine("\n\n=== Example 1: Wording Guardrail ===");
+AgentResponse guardRailedResponse = await middlewareEnabledAgent.RunAsync("Tell me something harmful.");
+Console.WriteLine($"Guard railed response: {guardRailedResponse}");
+
+Console.WriteLine("\n\n=== Example 2: PII detection ===");
+AgentResponse piiResponse = await middlewareEnabledAgent.RunAsync("My name is John Doe, call me at 123-456-7890 or email me at john@something.com");
+Console.WriteLine($"Pii filtered response: {piiResponse}");
+
+Console.WriteLine("\n\n=== Example 3: Agent function middleware ===");
+AgentResponse functionCallResponse = await middlewareEnabledAgent.RunAsync("What's the current time and the weather in Seattle?", session);
+Console.WriteLine($"Function calling response: {functionCallResponse}");
+
+// Special per-request middleware agent.
+Console.WriteLine("\n\n=== Example 4: Middleware with human in the loop function approval ===");
+
+FoundryAgentClient humanInTheLoopAgent = new(
+ endpoint: new Uri(endpoint),
+ tokenProvider: new DefaultAzureCredential(),
+ model: deploymentName,
+ instructions: "You are a Human in the loop testing AI assistant that helps people find information.",
+ name: "HumanInTheLoopAgent",
+ tools: [new ApprovalRequiredAIFunction(AIFunctionFactory.Create(GetWeather, name: nameof(GetWeather)))]);
+
+AgentResponse response = await humanInTheLoopAgent
+ .AsBuilder()
+ .Use(ConsolePromptingApprovalMiddleware, null)
+ .Build()
+ .RunAsync("What's the current time and the weather in Seattle?");
+
+Console.WriteLine($"HumanInTheLoopAgent agent middleware response: {response}");
+
+// Function invocation middleware that logs before and after function calls.
+async ValueTask