Skip to content

Commit 25696a7

Browse files
SergeyMenshykhCopilotCopilot
authored
.NET: Replace Azure Foundry/Azure AI Foundry with Microsoft Foundry in .NET samples (#5032)
* Replace Azure Foundry/Azure AI Foundry with Microsoft Foundry in samples Update all .cs, .md, and .yaml files in dotnet/samples/ to use 'Microsoft Foundry' instead of 'Azure Foundry' and 'Azure AI Foundry'. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update dotnet/samples/02-agents/AgentWithMemory/AgentWithMemory_Step04_MemoryUsingFoundry/Program.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update dotnet/samples/02-agents/Agents/Agent_Step15_DeepResearch/Program.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update dotnet/samples/05-end-to-end/A2AClientServer/README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update dotnet/samples/02-agents/Agents/Agent_Step15_DeepResearch/README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update dotnet/samples/03-workflows/Agents/FoundryAgent/Program.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update dotnet/samples/02-agents/AgentProviders/Agent_With_AzureAIProject/Program.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix grammar: 'an Microsoft' -> 'a Microsoft', 'agents ids' -> 'agent IDs' Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 2cb78ea commit 25696a7

39 files changed

Lines changed: 89 additions & 89 deletions

File tree

dotnet/samples/02-agents/AgentProviders/Agent_With_Anthropic/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ This sample demonstrates how to create an AIAgent using Anthropic Claude models
55
The sample supports three deployment scenarios:
66

77
1. **Anthropic Public API** - Direct connection to Anthropic's public API
8-
2. **Azure Foundry with API Key** - Anthropic models deployed through Azure Foundry using API key authentication
9-
3. **Azure Foundry with Azure CLI** - Anthropic models deployed through Azure Foundry using Azure CLI credentials
8+
2. **Microsoft Foundry with API Key** - Anthropic models deployed through Microsoft Foundry using API key authentication
9+
3. **Microsoft Foundry with Azure CLI** - Anthropic models deployed through Microsoft Foundry using Azure CLI credentials
1010

1111
## Prerequisites
1212

@@ -25,29 +25,29 @@ $env:ANTHROPIC_API_KEY="your-anthropic-api-key" # Replace with your Anthropic A
2525
$env:ANTHROPIC_CHAT_MODEL_NAME="claude-haiku-4-5" # Optional, defaults to claude-haiku-4-5
2626
```
2727

28-
### For Azure Foundry with API Key
28+
### For Microsoft Foundry with API Key
2929

30-
- Azure Foundry service endpoint and deployment configured
30+
- Microsoft Foundry service endpoint and deployment configured
3131
- Anthropic API key
3232

3333
Set the following environment variables:
3434

3535
```powershell
36-
$env:ANTHROPIC_RESOURCE="your-foundry-resource-name" # Replace with your Azure Foundry resource name (subdomain before .services.ai.azure.com)
36+
$env:ANTHROPIC_RESOURCE="your-foundry-resource-name" # Replace with your Microsoft Foundry resource name (subdomain before .services.ai.azure.com)
3737
$env:ANTHROPIC_API_KEY="your-anthropic-api-key" # Replace with your Anthropic API key
3838
$env:ANTHROPIC_CHAT_MODEL_NAME="claude-haiku-4-5" # Optional, defaults to claude-haiku-4-5
3939
```
4040

41-
### For Azure Foundry with Azure CLI
41+
### For Microsoft Foundry with Azure CLI
4242

43-
- Azure Foundry service endpoint and deployment configured
43+
- Microsoft Foundry service endpoint and deployment configured
4444
- Azure CLI installed and authenticated (for Azure credential authentication)
4545

4646
Set the following environment variables:
4747

4848
```powershell
49-
$env:ANTHROPIC_RESOURCE="your-foundry-resource-name" # Replace with your Azure Foundry resource name (subdomain before .services.ai.azure.com)
49+
$env:ANTHROPIC_RESOURCE="your-foundry-resource-name" # Replace with your Microsoft Foundry resource name (subdomain before .services.ai.azure.com)
5050
$env:ANTHROPIC_CHAT_MODEL_NAME="claude-haiku-4-5" # Optional, defaults to claude-haiku-4-5
5151
```
5252

53-
**Note**: When using Azure Foundry with Azure CLI, 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).
53+
**Note**: When using Microsoft Foundry with Azure CLI, make sure you're logged in with `az login` and have access to the Microsoft Foundry resource. For more information, see the [Azure CLI documentation](https://learn.microsoft.com/cli/azure/authenticate-azure-cli-interactively).

dotnet/samples/02-agents/AgentProviders/Agent_With_AzureAIAgentsPersistent/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#pragma warning disable CS0618 // Type or member is obsolete - sample uses deprecated PersistentAgentsClientExtensions
44

5-
// This sample shows how to create and use a simple AI agent with Azure Foundry Agents as the backend.
5+
// This sample shows how to create and use a simple AI agent with Microsoft Foundry Agents as the backend.
66

77
using Azure.AI.Agents.Persistent;
88
using Azure.Identity;

dotnet/samples/02-agents/AgentProviders/Agent_With_AzureAIAgentsPersistent/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ Below is a comparison between the classic and new Foundry Agents approaches:
1313
Before you begin, ensure you have the following prerequisites:
1414

1515
- .NET 10 SDK or later
16-
- Azure Foundry service endpoint and deployment configured
16+
- Microsoft Foundry service endpoint and deployment configured
1717
- Azure CLI installed and authenticated (for Azure credential authentication)
1818

19-
**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).
19+
**Note**: This demo uses Azure CLI credentials for authentication. Make sure you're logged in with `az login` and have access to the Microsoft Foundry resource. For more information, see the [Azure CLI documentation](https://learn.microsoft.com/cli/azure/authenticate-azure-cli-interactively).
2020

2121
Set the following environment variables:
2222

2323
```powershell
24-
$env:AZURE_AI_PROJECT_ENDPOINT="https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project" # Replace with your Azure Foundry resource endpoint
24+
$env:AZURE_AI_PROJECT_ENDPOINT="https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project" # Replace with your Microsoft Foundry resource endpoint
2525
$env:AZURE_AI_MODEL_DEPLOYMENT_NAME="gpt-4o-mini" # Optional, defaults to gpt-4o-mini
2626
```

dotnet/samples/02-agents/AgentProviders/Agent_With_AzureAIProject/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) Microsoft. All rights reserved.
22

3-
// This sample shows how to create and use a AI agents with Azure Foundry Agents as the backend.
3+
// This sample shows how to create and use AI agents with Microsoft Foundry Agents as the backend.
44

55
using Azure.AI.Projects;
66
using Azure.AI.Projects.Agents;
@@ -13,7 +13,7 @@
1313

1414
const string JokerName = "JokerAgent";
1515

16-
// Get a client to create/retrieve/delete server side agents with Azure Foundry Agents.
16+
// Get a client to create/retrieve/delete server side agents with Microsoft Foundry Agents.
1717
// WARNING: DefaultAzureCredential is convenient for development but requires careful consideration in production.
1818
// In production, consider using a specific credential (e.g., ManagedIdentityCredential) to avoid
1919
// latency issues, unintended credential probing, and potential security risks from fallback mechanisms.

dotnet/samples/02-agents/AgentProviders/Agent_With_AzureAIProject/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ Below is a comparison between the classic and new Foundry Agents approaches:
1313
Before you begin, ensure you have the following prerequisites:
1414

1515
- .NET 10 SDK or later
16-
- Azure Foundry service endpoint and deployment configured
16+
- Microsoft Foundry service endpoint and deployment configured
1717
- Azure CLI installed and authenticated (for Azure credential authentication)
1818

19-
**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).
19+
**Note**: This demo uses Azure CLI credentials for authentication. Make sure you're logged in with `az login` and have access to the Microsoft Foundry resource. For more information, see the [Azure CLI documentation](https://learn.microsoft.com/cli/azure/authenticate-azure-cli-interactively).
2020

2121
Set the following environment variables:
2222

2323
```powershell
24-
$env:AZURE_AI_PROJECT_ENDPOINT="https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project" # Replace with your Azure Foundry resource endpoint
24+
$env:AZURE_AI_PROJECT_ENDPOINT="https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project" # Replace with your Microsoft Foundry resource endpoint
2525
$env:AZURE_AI_MODEL_DEPLOYMENT_NAME="gpt-4o-mini" # Optional, defaults to gpt-4o-mini
2626
```

dotnet/samples/02-agents/AgentProviders/Agent_With_AzureFoundryModel/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) Microsoft. All rights reserved.
22

3-
// This sample shows how to use the OpenAI SDK to create and use a simple AI agent with any model hosted in Azure AI Foundry.
4-
// You could use models from Microsoft, OpenAI, DeepSeek, Hugging Face, Meta, xAI or any other model you have deployed in your Azure AI Foundry resource.
3+
// This sample shows how to use the OpenAI SDK to create and use a simple AI agent with any model hosted in Microsoft Foundry.
4+
// You could use models from Microsoft, OpenAI, DeepSeek, Hugging Face, Meta, xAI or any other model you have deployed in your Microsoft Foundry resource.
55
// Note: Ensure that you pick a model that suits your needs. For example, if you want to use function calling, ensure that the model you pick supports function calling.
66

77
using System.ClientModel;
@@ -15,7 +15,7 @@
1515
var apiKey = Environment.GetEnvironmentVariable("AZURE_OPENAI_API_KEY");
1616
var model = Environment.GetEnvironmentVariable("AZURE_AI_MODEL_DEPLOYMENT_NAME") ?? "Phi-4-mini-instruct";
1717

18-
// Since we are using the OpenAI Client SDK, we need to override the default endpoint to point to Azure Foundry.
18+
// Since we are using the OpenAI Client SDK, we need to override the default endpoint to point to Microsoft Foundry.
1919
var clientOptions = new OpenAIClientOptions() { Endpoint = new Uri(endpoint) };
2020

2121
// Create the OpenAI client with either an API key or Azure CLI credential.

dotnet/samples/02-agents/AgentProviders/Agent_With_AzureFoundryModel/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
## Overview
22

3-
This sample shows how to use the OpenAI SDK to create and use a simple AI agent with any model hosted in Azure AI Foundry.
3+
This sample shows how to use the OpenAI SDK to create and use a simple AI agent with any model hosted in Microsoft Foundry.
44

5-
You could use models from Microsoft, OpenAI, DeepSeek, Hugging Face, Meta, xAI or any other model you have deployed in Azure AI Foundry.
5+
You could use models from Microsoft, OpenAI, DeepSeek, Hugging Face, Meta, xAI or any other model you have deployed in Microsoft Foundry.
66

77
**Note**: Ensure that you pick a model that suits your needs. For example, if you want to use function calling, ensure that the model you pick supports function calling.
88

@@ -11,19 +11,19 @@ You could use models from Microsoft, OpenAI, DeepSeek, Hugging Face, Meta, xAI o
1111
Before you begin, ensure you have the following prerequisites:
1212

1313
- .NET 10 SDK or later
14-
- Azure AI Foundry resource
15-
- A model deployment in your Azure AI Foundry resource. This example defaults to using the `Phi-4-mini-instruct` model,
14+
- Microsoft Foundry resource
15+
- A model deployment in your Microsoft Foundry resource. This example defaults to using the `Phi-4-mini-instruct` model,
1616
so if you want to use a different model, ensure that you set your `AZURE_AI_MODEL_DEPLOYMENT_NAME` environment
1717
variable to the name of your deployed model.
18-
- An API key or role based authentication to access the Azure AI Foundry resource
18+
- An API key or role based authentication to access the Microsoft Foundry resource
1919

2020
See [here](https://learn.microsoft.com/en-us/azure/ai-foundry/quickstarts/get-started-code?tabs=csharp) for more info on setting up these prerequisites
2121

2222
Set the following environment variables:
2323

2424
```powershell
25-
# Replace with your Azure AI Foundry resource endpoint
26-
# Ensure that you have the "/openai/v1/" path in the URL, since this is required when using the OpenAI SDK to access Azure Foundry models.
25+
# Replace with your Microsoft Foundry resource endpoint
26+
# Ensure that you have the "/openai/v1/" path in the URL, since this is required when using the OpenAI SDK to access Microsoft Foundry models.
2727
$env:AZURE_OPENAI_ENDPOINT="https://ai-foundry-<myresourcename>.services.ai.azure.com/openai/v1/"
2828
2929
# Optional, defaults to using Azure CLI for authentication if not provided

dotnet/samples/02-agents/AgentProviders/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ See the README.md for each sample for the prerequisites for that sample.
1818
|[Creating an AIAgent with Anthropic](./Agent_With_Anthropic/)|This sample demonstrates how to create an AIAgent using Anthropic Claude models as the underlying inference service|
1919
|[Creating an AIAgent with Foundry Agents using Azure.AI.Agents.Persistent](./Agent_With_AzureAIAgentsPersistent/)|This sample demonstrates how to create a Foundry Persistent agent and expose it as an AIAgent using the Azure.AI.Agents.Persistent SDK|
2020
|[Creating an AIAgent with Foundry Agents using Azure.AI.Project](./Agent_With_AzureAIProject/)|This sample demonstrates how to create an Foundry Project agent and expose it as an AIAgent using the Azure.AI.Project SDK|
21-
|[Creating an AIAgent with AzureFoundry Model](./Agent_With_AzureFoundryModel/)|This sample demonstrates how to use any model deployed to Azure Foundry to create an AIAgent|
21+
|[Creating an AIAgent with Foundry Model](./Agent_With_AzureFoundryModel/)|This sample demonstrates how to use any model deployed to Microsoft Foundry to create an AIAgent|
2222
|[Creating an AIAgent with Azure OpenAI ChatCompletion](./Agent_With_AzureOpenAIChatCompletion/)|This sample demonstrates how to create an AIAgent using Azure OpenAI ChatCompletion as the underlying inference service|
2323
|[Creating an AIAgent with Azure OpenAI Responses](./Agent_With_AzureOpenAIResponses/)|This sample demonstrates how to create an AIAgent using Azure OpenAI Responses as the underlying inference service|
2424
|[Creating an AIAgent with a custom implementation](./Agent_With_CustomImplementation/)|This sample demonstrates how to create an AIAgent with a custom implementation|

dotnet/samples/02-agents/AgentWithAnthropic/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ Before you begin, ensure you have the following prerequisites:
1818

1919
**Note**: These samples use Anthropic Claude models. For more information, see [Anthropic documentation](https://docs.anthropic.com/).
2020

21-
## Using Anthropic with Azure Foundry
21+
## Using Anthropic with Microsoft Foundry
2222

23-
To use Anthropic with Azure Foundry, you can check the sample [AgentProviders/Agent_With_Anthropic](../AgentProviders/Agent_With_Anthropic/README.md) for more details.
23+
To use Anthropic with Microsoft Foundry, you can check the sample [AgentProviders/Agent_With_Anthropic](../AgentProviders/Agent_With_Anthropic/README.md) for more details.
2424

2525
## Samples
2626

dotnet/samples/02-agents/AgentWithMemory/AgentWithMemory_Step04_MemoryUsingFoundry/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Copyright (c) Microsoft. All rights reserved.
22

33
// This sample shows how to use the FoundryMemoryProvider to persist and recall memories for an agent.
4-
// The sample stores conversation messages in an Azure AI Foundry memory store and retrieves relevant
4+
// The sample stores conversation messages in a Microsoft Foundry memory store and retrieves relevant
55
// memories for subsequent invocations, even across new sessions.
66
//
7-
// Note: Memory extraction in Azure AI Foundry is asynchronous and takes time. This sample demonstrates
7+
// Note: Memory extraction in Microsoft Foundry is asynchronous and takes time. This sample demonstrates
88
// a simple polling approach to wait for memory updates to complete before querying.
99

1010
using System.Text.Json;
@@ -62,7 +62,7 @@
6262
Console.WriteLine(await agent.RunAsync("Hi there! My name is Taylor and I'm planning a hiking trip to Patagonia in November.", session));
6363
Console.WriteLine(await agent.RunAsync("I'm travelling with my sister and we love finding scenic viewpoints.", session));
6464

65-
// Memory extraction in Azure AI Foundry is asynchronous and takes time to process.
65+
// Memory extraction in Microsoft Foundry is asynchronous and takes time to process.
6666
// WhenUpdatesCompletedAsync polls all pending updates and waits for them to complete.
6767
Console.WriteLine("\nWaiting for Foundry Memory to process updates...");
6868
await memoryProvider.WhenUpdatesCompletedAsync();

0 commit comments

Comments
 (0)