Skip to content

Commit 8973900

Browse files
authored
Merge pull request #473 from microsoft/bruno-renameToMicrosoftFoundry
Update documentation for Microsoft Foundry and clean up code
2 parents 75a565e + f7d7592 commit 8973900

18 files changed

Lines changed: 114 additions & 118 deletions

File tree

02-SetupDevEnvironment/getting-started-azure-openai.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# Setting Up the Development Environment for Azure OpenAI
22

3-
If you want to use Azure AI Foundry models for your .NET AI apps in this course, follow the steps in this guide.
3+
If you want to use Microsoft Foundry models for your .NET AI apps in this course, follow the steps in this guide.
44

55
Don't want to use Azure OpenAI?
66

77
👉 [To use GitHub Models this is the guide for you](README.md)
88
👉 [Here are the steps for Ollama](getting-started-ollama.md)
99

10-
## Create the Azure AI Foundry resources
10+
## Create the Microsoft Foundry resources
1111

12-
To use Azure AI Foundry models, you need to create a hub and project in the Azure AI Foundry portal. Then you'll need to deploy a model. This section will show you how to do that.
12+
To use Microsoft Foundry models, you need to create a hub and project in the Microsoft Foundry portal. Then you'll need to deploy a model. This section will show you how to do that.
1313

14-
### Create a Hub and Project in Azure AI Foundry
14+
### Create a Hub and Project in Microsoft Foundry
1515

16-
1. Go to the [Azure AI Foundry Portal](https://ai.azure.com/).
16+
1. Go to the [Microsoft Foundry Portal](https://ai.azure.com/).
1717
1. Sign in with your Azure account.
1818
1. Select **All hubs + projects** from the left-hand menu and then click the **+ New hub** from the dropdown. (Note: You may have to click on **+ New project** first to see the **+ New hub** option).
1919
![Create a new hub](./images/ai-foundry-hub-selection.png)
@@ -28,13 +28,13 @@ To use Azure AI Foundry models, you need to create a hub and project in the Azur
2828
- Give your project a name (e.g., "GenAINET") or accept the default.
2929
- Click **Create**.
3030

31-
🎉 **Done!** Youve just created your first project in Azure AI Foundry.
31+
🎉 **Done!** You've just created your first project in Microsoft Foundry.
3232

33-
### Deploy a Language Model in Azure AI Foundry
33+
### Deploy a Language Model in Microsoft Foundry
3434

3535
Now, let’s deploy a **gpt-4o-mini** model to your project:
3636

37-
1. In the Azure AI Foundry portal, navigate to your project (it should automatically open after creating it).
37+
1. In the Microsoft Foundry portal, navigate to your project (it should automatically open after creating it).
3838
1. Click on **Models and Endpoints** from the left-hand menu and then the **Deploy Model** button.
3939
1. Select **Deploy base model** from the dropdown.
4040
1. Search for **gpt-4o-mini** in the model catalog.
@@ -43,7 +43,7 @@ Now, let’s deploy a **gpt-4o-mini** model to your project:
4343
1. Click **Deploy** and wait for the model to be provisioned.
4444
1. Once deployed, note the **Model Name**, **Target URI**, and **API Key** from the model details page.
4545

46-
🎉 **Done!** Youve deployed your first Large Language Model in Azure AI Foundry.
46+
🎉 **Done!** You've deployed your first Large Language Model in Microsoft Foundry.
4747

4848
![Model deployed, copy model name, endpoint url and apikey](./images/deploytoazure-20-copymodelinfo.png)
4949

@@ -58,7 +58,7 @@ To be secure, let's add the API key you just created to your Codespace's secrets
5858

5959
![Adding a new Codespace secret](./images/codespaces-secret.jpeg)
6060
1. Name your secret **AZURE_AI_SECRET**.
61-
1. Paste the API key you copied from the Azure AI Foundry portal into the **Secret** field.
61+
1. Paste the API key you copied from the Microsoft Foundry portal into the **Secret** field.
6262

6363
## Creating a GitHub Codespace
6464

@@ -90,15 +90,17 @@ Now let’s update the code to use the newly deployed model. First we'll need to
9090
1. Open the terminal and switch to the project directory:
9191

9292
If you're using Windows Command Prompt (CMD) or PowerShell:
93+
9394
```bash
9495
cd samples\CoreSamples\BasicChat-01MEAI
9596
```
96-
97+
9798
If you're using Linux, macOS, Git Bash, WSL, or the VS Code terminal:
99+
98100
```bash
99101
cd samples/CoreSamples/BasicChat-01MEAI
100102
```
101-
103+
102104
> **Note**: GitHub Codespaces runs a Linux environment, so always use forward slashes (`/`) in paths when working in Codespaces, regardless of your local operating system.
103105
104106
1. Run the following commands to add the required package:
@@ -114,7 +116,6 @@ Now let’s update the code to use the newly deployed model. First we'll need to
114116

115117
Add the following using statements at the top of the file:
116118

117-
118119
```csharp
119120
using System.ClientModel;
120121
using Azure.AI.OpenAI;
@@ -160,13 +161,13 @@ Now let’s update the code to use the newly deployed model. First we'll need to
160161
161162
## Summary
162163
163-
In this lesson, you learned how to set up your development environment for the rest of the course. You created a GitHub Codespace and configured it to use Azure OpenAI. You also updated the sample code to use the newly deployed model in Azure AI Foundry.
164+
In this lesson, you learned how to set up your development environment for the rest of the course. You created a GitHub Codespace and configured it to use Azure OpenAI. You also updated the sample code to use the newly deployed model in Microsoft Foundry.
164165
165166
### Additional Resources
166167
167-
- [Azure AI Foundry Documentation](https://learn.microsoft.com/azure/ai-services/)
168+
- [Microsoft Foundry Documentation](https://learn.microsoft.com/azure/ai-services/)
168169
- [Working with GitHub Codespaces](https://docs.github.com/en/codespaces/getting-started)
169-
- [How to Deploy Models in Azure AI Foundry](https://learn.microsoft.com/azure/ai-foundry/how-to/deploy-models-openai)
170+
- [How to Deploy Models in Microsoft Foundry](https://learn.microsoft.com/azure/ai-foundry/how-to/deploy-models-openai)
170171
- [Azure.AI.OpenAI NuGet Package](https://www.nuget.org/packages/Azure.AI.OpenAI)
171172
172173
## Next Steps

03-CoreGenerativeAITechniques/01-lm-completions-functions.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ A text completion itself is not a chat application, it is a one and done interac
1616

1717
### Text completions
1818

19-
Let's see how you would use text completions using the **Microsoft.Extensions.AI** library in .NET.
19+
Let's see how you would use text completions using the **Microsoft.Extensions.AI** library in .NET.
2020

2121
> 🧑‍💻**Sample code**: [Here is a working example of this application](../samples/CoreSamples/BasicChat-01MEAI/) you can follow along with.
2222
@@ -26,22 +26,25 @@ To run the sample code, you'll need to:
2626

2727
1. Make sure you have set up a GitHub Codespace with the appropriate environment as described in the [Setup guide](../02-SetupDevEnvironment/readme.md)
2828
2. Ensure you have configured your GitHub Token as described in the [Pre-flight check section](../02-SetupDevEnvironment/readme.md#pre-flight-check-setting-up-github-access-tokens)
29-
3. Open a terminal in your codespace (Ctrl+` or Cmd+`)
29+
3. Open a terminal in your codespace (Ctrl+`or Cmd+`)
3030
4. Navigate to the sample code directory:
31-
31+
3232
If you're using Windows Command Prompt (CMD) or PowerShell:
33+
3334
```bash
3435
cd samples\CoreSamples\BasicChat-01MEAI
3536
```
36-
37+
3738
If you're using Linux, macOS, Git Bash, WSL, or the VS Code terminal:
39+
3840
```bash
3941
cd samples/CoreSamples/BasicChat-01MEAI
4042
```
41-
43+
4244
> **Note**: GitHub Codespaces runs a Linux environment, so always use forward slashes (`/`) in paths when working in Codespaces, regardless of your local operating system.
4345
4446
5. Run the application:
47+
4548
```bash
4649
dotnet run
4750
```
@@ -69,13 +72,13 @@ Console.WriteLine(response.Text);
6972
```
7073

7174
> 🗒️**Note:** This example showed GitHub Models as the hosting service. If you want to use Ollama, [check out this example](../samples/CoreSamples/BasicChat-03Ollama/) (it instantiates a different `IChatClient`).
72-
>
73-
> If you want to use Azure AI Foundry you can use the same code, but you will need to change the endpoint and the credentials.
75+
> If you want to use Microsoft Foundry you can use the same code, but you will need to change the endpoint and the credentials.
76+
>
7477
>
7578
> **GitHub Models Endpoint:** The endpoint `https://models.github.ai/inference` is the new dedicated GitHub Models endpoint as announced in the [GitHub Models deprecation notice](https://github.blog/changelog/2025-07-17-deprecation-of-azure-endpoint-for-github-models/), replacing the previous Azure-based endpoint.
7679
>
7780
> If you want to use both Ollama and Semantic Kernel together, [check out the BasicChat-04OllamaSK example](../samples/CoreSamples/BasicChat-04OllamaSK/).
78-
>
81+
>
7982
> For instructions on how to set up Ollama, refer to [Getting Started with Ollama](../02-SetupDevEnvironment/getting-started-ollama.md).
8083
8184
> 🙋 **Need help?**: If you encounter any issues running this example, [open an issue in the repository](https://github.com/microsoft/Generative-AI-for-beginners-dotnet/issues/new?template=Blank+issue) and we'll help you troubleshoot.
@@ -210,9 +213,9 @@ In the next lesson you'll see how to start chatting with data and build what's k
210213

211214
## Additional resources
212215

213-
- [Build an AI chat app with .NET](https://learn.microsoft.com/dotnet/ai/quickstarts/get-started-openai?tabs=azd&pivots=openai)
214-
- [Execute a local .NET function](https://learn.microsoft.com/dotnet/ai/quickstarts/quickstart-azure-openai-tool?tabs=azd&pivots=openai)
215-
- [Chat with a local AI model](https://learn.microsoft.com/dotnet/ai/quickstarts/quickstart-local-ai)
216+
* [Build an AI chat app with .NET](https://learn.microsoft.com/dotnet/ai/quickstarts/get-started-openai?tabs=azd&pivots=openai)
217+
* [Execute a local .NET function](https://learn.microsoft.com/dotnet/ai/quickstarts/quickstart-azure-openai-tool?tabs=azd&pivots=openai)
218+
* [Chat with a local AI model](https://learn.microsoft.com/dotnet/ai/quickstarts/quickstart-local-ai)
216219
217220
## Up next
218221

03-CoreGenerativeAITechniques/04-agents.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ One key thing to keep in mind when building agents is that they are focused on d
1616
1717
## Creating an AI Agent
1818

19-
We'll be working with a couple of new concepts in order to build an AI agent in .NET. We'll be using a new SDK and will have to do some additional setup in Azure AI Foundry to get things started.
19+
We'll be working with a couple of new concepts in order to build an AI agent in .NET. We'll be using a new SDK and will have to do some additional setup in Microsoft Foundry to get things started.
2020

2121
> 🧑‍💻**Sample code**: We'll be working from the [AgentLabs-01-Simple sample](../samples/CoreSamples/AgentLabs-01-Simple/) for this lesson.
2222
>
2323
> We also have more advanced agent examples:
24+
>
2425
> - [AgentLabs-02-Functions](../samples/CoreSamples/AgentLabs-02-Functions/) - Showing how to create custom functions for your agents
2526
> - [AgentLabs-03-OpenAPIs](../samples/CoreSamples/AgentLabs-03-OpenAPIs/) - Demonstrating how agents can use OpenAPI specifications
2627
> - [AgentLabs-03-PythonParksInformationServer](../samples/CoreSamples/AgentLabs-03-PythonParksInformationServer/) - A Python server that works with the OpenAPI example
@@ -29,7 +30,7 @@ We'll be working with a couple of new concepts in order to build an AI agent in
2930

3031
We're going to introduce a new Azure Service that will help us build agents, the appropriately named [Azure AI Agent Service](https://learn.microsoft.com/azure/ai-services/agents/overview).
3132

32-
To run the code samples included in this lesson, you'll need to perform some additional setup in Azure AI Foundry. You can follow [these instructions to setup a **Basic Agent**](https://learn.microsoft.com/azure/ai-services/agents/quickstart?pivots=programming-language-csharp).
33+
To run the code samples included in this lesson, you'll need to perform some additional setup in Microsoft Foundry. You can follow [these instructions to setup a **Basic Agent**](https://learn.microsoft.com/azure/ai-services/agents/quickstart?pivots=programming-language-csharp).
3334

3435
### Azure AI Projects library
3536

@@ -65,12 +66,12 @@ We'll be building a single purpose agent that acts as a tutor to math students.
6566
AgentsClient client = new AgentsClient(connectionString, new DefaultAzureCredential(options));
6667
```
6768

68-
You can find the project connection string in AI Foundry by opening up the Hub you created, then the project. It will be on the right-hand side.
69+
You can find the project connection string in Microsoft Foundry by opening up the Hub you created, then the project. It will be on the right-hand side.
6970

7071
![Screenshot of the project homepage in AI Foundry with the project connection string highlighted in red](./images/project-connection-string.png)
7172

7273
1. Next we want to create the tutor agent. Remember, it should be focused only on one thing.
73-
74+
7475
```csharp
7576
// create Agent
7677
Response<Agent> agentResponse = await client.CreateAgentAsync(
@@ -87,7 +88,7 @@ We'll be building a single purpose agent that acts as a tutor to math students.
8788

8889
> 🗒️**Note**: You can create your own tools too. See the [Functions](./src/AgentLabs-02-Functions/) to learn more.
8990

90-
Second note the `instructions` that are being sent along. It's a prompt and we're limiting it to answering math questions. Then last creating the agent is an async operation. That's because it's creating an object within Azure AI Foundry Agents service. So we both `await` the `CreateAgentAsync` function and then grab the `Value` of its return to get at the actual `Agent` object. You'll see this pattern occur over and over again when creating objects with the **Azure.AI.Projects** SDK.
91+
Second note the `instructions` that are being sent along. It's a prompt and we're limiting it to answering math questions. Then last creating the agent is an async operation. That's because it's creating an object within Microsoft Foundry Agents service. So we both `await` the `CreateAgentAsync` function and then grab the `Value` of its return to get at the actual `Agent` object. You'll see this pattern occur over and over again when creating objects with the **Azure.AI.Projects** SDK.
9192

9293
1. An `AgentThread` is an object that handles the communication between individual agents and the user and so on. We'll need to create that so we can add a `ThreadMessage` on to it. And in this case it's the user's first question.
9394

@@ -120,6 +121,7 @@ We'll be building a single purpose agent that acts as a tutor to math students.
120121
, additionalInstructions: "You are working in FREE TIER EXPERIENCE mode, every user has premium account for a short period of time. Explain detailed the steps to answer the user questions"
121122
);
122123
ThreadRun run = runResponse.Value;
124+
123125
```
124126

125127
1. All that's left then is to check the status of the run

06-AgentFx/readme.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Build powerful, orchestrated AI agents with Microsoft Agent Framework - the next
88

99
- 🤖 Understanding the Microsoft Agent Framework and its architecture
1010
- 🔗 Creating and orchestrating multiple AI agents
11-
- 🌐 Working with different AI providers (GitHub Models, Azure AI Foundry, Ollama)
11+
- 🌐 Working with different AI providers (GitHub Models, Microsoft Foundry, Ollama)
1212
- 🔄 Building sequential and concurrent agent workflows
1313
- 🛠️ Integrating with Model Context Protocol (MCP) for enhanced capabilities
1414

@@ -79,7 +79,7 @@ Before starting with AgentFx, ensure you have:
7979
- **.NET 9 SDK** or later
8080
- **AI Provider Access**: At least one of the following:
8181
- GitHub Token for GitHub Models
82-
- Azure AI Foundry endpoint using managed identities o using an API key
82+
- Microsoft Foundry endpoint using managed identities o using an API key
8383
- Ollama installed locally
8484

8585
### Installation
@@ -106,7 +106,7 @@ This lesson includes multiple code samples demonstrating different aspects of th
106106
|--------|-------------|-------------|----------|
107107
| [AgentFx01](../samples/AgentFx/AgentFx01/) | Single agent that writes creative stories | Basic agent setup, ChatClientAgent | GitHub Models |
108108
| [AgentFx02](../samples/AgentFx/AgentFx02/) | Two-agent workflow: Writer + Editor | Sequential workflows, agent chaining | GitHub Models |
109-
| [AgentFx-AIFoundry-01](../samples/AgentFx/AgentFx-AIFoundry-01/) | Single agent using Azure AI Foundry | Azure CLI authentication, managed identity | Azure AI Foundry |
109+
| [AgentFx-AIFoundry-01](../samples/AgentFx/AgentFx-AIFoundry-01/) | Single agent using Microsoft Foundry | Azure CLI authentication, managed identity | Microsoft Foundry |
110110
| [AgentFx-Ollama-01](../samples/AgentFx/AgentFx-Ollama-01/) | Single agent using local Ollama models | Local AI inference, privacy-focused | Ollama (local) |
111111
| [AgentFx-BackgroundResponses-01-Simple](../samples/AgentFx/AgentFx-BackgroundResponses-01-Simple/) | Background responses with continuation tokens | Streaming interruption, response continuation | Configurable |
112112
| [AgentFx-BackgroundResponses-02-Tools](../samples/AgentFx/AgentFx-BackgroundResponses-02-Tools/) | Background responses with tool integration | Tool usage during background processing | Configurable |
@@ -119,7 +119,7 @@ This lesson includes multiple code samples demonstrating different aspects of th
119119
| Sample | Description | Key Concepts | Providers |
120120
|--------|-------------|-------------|-----------|
121121
| [AgentFx-MultiModel](../samples/AgentFx/AgentFx-MultiModel/) | Three-agent workflow across multiple providers | Multi-provider orchestration, OpenTelemetry tracing | GitHub Models or Azure OpenAI + Ollama |
122-
| [AgentFx-MultiAgents](../samples/AgentFx/AgentFx-MultiAgents/) | Researcher-Writer-Reviewer workflow with persistent agents | Azure AI Foundry persistent agents, flexible configuration | Azure AI Foundry + Azure OpenAI/GitHub Models + Ollama |
122+
| [AgentFx-MultiAgents](../samples/AgentFx/AgentFx-MultiAgents/) | Researcher-Writer-Reviewer workflow with persistent agents | Microsoft Foundry persistent agents, flexible configuration | Microsoft Foundry + Azure OpenAI/GitHub Models + Ollama |
123123

124124
### Integration & Web Samples
125125

@@ -176,7 +176,7 @@ dotnet user-secrets set "GITHUB_TOKEN" "your-github-token"
176176
dotnet run
177177
```
178178

179-
**Azure AI Foundry** (requires Azure CLI login):
179+
**Microsoft Foundry** (requires Azure CLI login):
180180

181181
Windows (CMD/PowerShell):
182182

@@ -328,7 +328,7 @@ var nextResponse = await agent.RunAsync("What is my name?", resumedThread);
328328
### Key Considerations
329329

330330
- **Agent consistency**: You must use the same agent type to deserialize threads, as different agents may have unique internal implementations
331-
- **Storage flexibility**: The framework abstracts storage details - some agents (like Azure AI Foundry) persist history in the service, while others (like OpenAI chat completion) manage state in-memory
331+
- **Storage flexibility**: The framework abstracts storage details - some agents (like Microsoft Foundry) persist history in the service, while others (like OpenAI chat completion) manage state in-memory
332332
- **Production storage**: For production scenarios, use reliable storage like cloud databases or blob storage instead of local files
333333

334334
> 🧑‍💻 **Sample code**: Explore the persisted conversation samples:
@@ -380,7 +380,7 @@ Name = "Agent1" // Avoid, please no!
380380
Choose AI providers based on your needs:
381381

382382
- **GitHub Models**: Quick prototyping and development
383-
- **Azure AI Foundry**: Production workloads with enterprise features
383+
- **Microsoft Foundry**: Production workloads with enterprise features
384384
- **Ollama**: Local development, privacy-sensitive data
385385

386386
### 4. Error Handling
@@ -477,7 +477,7 @@ The Microsoft Agent Framework represents the next evolution in .NET AI developme
477477
- [Microsoft Agent Framework Overview](https://learn.microsoft.com/agent-framework/overview/agent-framework-overview)
478478
- [Model Context Protocol C# SDK](https://github.com/modelcontextprotocol/csharp-sdk)
479479
- [Microsoft.Extensions.AI Documentation](https://learn.microsoft.com/dotnet/ai/ai-extensions)
480-
- [Azure AI Foundry](https://ai.azure.com/)
480+
- [Microsoft Foundry](https://ai.azure.com/)
481481
- [GitHub Models](https://github.com/marketplace/models)
482482
- [Ollama Documentation](https://ollama.ai/docs)
483483

0 commit comments

Comments
 (0)