|
1 | 1 | --- |
2 | 2 | title: Work with Azure AI Foundry Agent Service using the Azure AI Foundry for Visual Studio Code extension |
3 | 3 | titleSuffix: Azure AI Foundry |
4 | | -description: Use this article to learn how to use Azure AI Foundry Agent Service directly in VS Code. |
| 4 | +description: Use this article to learn how to use Azure AI Foundry Agent Service directly in Visual Studio Code. |
5 | 5 | manager: mcleans |
6 | 6 | ms.service: azure-ai-foundry |
7 | 7 | content_well_notification: |
8 | 8 | - AI-contribution |
9 | 9 | ai-usage: ai-assisted |
10 | 10 | ms.topic: how-to |
11 | 11 | zone_pivot_groups: ai-foundry-vsc-extension-languages |
12 | | -ms.date: 10/09/2025 |
| 12 | +ms.date: 10/16/2025 |
13 | 13 | ms.reviewer: erichen |
14 | 14 | ms.author: johalexander |
15 | 15 | author: ms-johnalex |
@@ -131,7 +131,7 @@ Add a tool to the AI Agent with the following steps: |
131 | 131 | 1. After entering the required information, select the **Upload and save** button in the bottom-left corner. |
132 | 132 | |
133 | 133 | > [!NOTE] |
134 | | - > When you add a tool, you can also add any new assets it needs. For example, if you add a File Search tool, you can use an existing vector store asset or make a new asset for your vector store to host your uploaded files. |
| 134 | + > When you add a tool, you can also add any new assets, it needs. For example, if you add a File Search tool, you can use an existing vector store asset or make a new asset for your vector store to host your uploaded files. |
135 | 135 | |
136 | 136 | 1. After entering the required information, select the **Create tool** button in the bottom-left corner. |
137 | 137 |
|
@@ -269,31 +269,54 @@ Install the following packages from source: |
269 | 269 |
|
270 | 270 | ::: zone pivot="csharp" |
271 | 271 |
|
272 | | -C# workflows require nightly builds from Microsoft's GitHub Packages, follow these steps to set it up: |
273 | | - 1. Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic) → Generate new token (classic) |
274 | | - 1. Create a GitHub Personal Access Token with the `read:packages` scope using these [instructions](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic) |
275 | | - 1. Copy the generated token (it will start with `ghp_`) and save it securely - you won't be able to see it again. |
| 272 | +## Prerequisites |
276 | 273 |
|
| 274 | +To run the sample multi-agent workflow C# project, ensure you have the following prerequisites: |
277 | 275 |
|
| 276 | +- .NET 9 SDK or higher |
| 277 | +- An AI Foundry Project or Azure OpenAI resource |
278 | 278 |
|
279 | | -#### Update NuGet Configuration |
| 279 | +## Setup and installation |
280 | 280 |
|
281 | | -In `Nuget.Config`, replace the following placeholders: |
282 | | -```xml |
283 | | -<add key="Username" value="YOUR_GITHUB_USERNAME" /> <!-- Replace with your GitHub username --> |
284 | | -<add key="ClearTextPassword" value="YOUR_GITHUB_PERSONAL_ACCESS_TOKEN" /> <!-- Replace with your GitHub PAT --> |
285 | | -``` |
| 281 | +1. **Install the .NET SDK** |
| 282 | + |
| 283 | + Download and install the .NET 9 SDK from the [official .NET website](https://dotnet.microsoft.com/download). |
| 284 | + |
| 285 | +2. **Restore NuGet packages** |
| 286 | + |
| 287 | + Go to your project directory and run this command to get the needed NuGet packages: |
| 288 | + |
| 289 | + ```bash |
| 290 | + dotnet restore |
| 291 | + ``` |
| 292 | + |
| 293 | +3. **Configure environment variables** |
| 294 | + |
| 295 | + The sample workflow project creates an `.env` file with the needed environment variables. Create or update the `.env` file with your Azure OpenAI credentials: |
| 296 | + |
| 297 | + ``` |
| 298 | + # Your Azure OpenAI endpoint |
| 299 | + AZURE_OPENAI_ENDPOINT=https://<your-openai-resource>.openai.azure.com/ |
| 300 | + |
| 301 | + # Your Azure OpenAI API key |
| 302 | + AZURE_OPENAI_API_KEY=<your-api-key> |
| 303 | + |
| 304 | + # Your model deployment name in Azure OpenAI |
| 305 | + MODEL_DEPLOYMENT_NAME=<your-model-deployment-name> |
| 306 | + ``` |
| 307 | + |
| 308 | + > [!IMPORTANT] |
| 309 | + > Never commit the `.env` file to version control. Add it to your `.gitignore` file. |
286 | 310 |
|
287 | 311 | ::: zone-end |
288 | 312 |
|
289 | 313 | ### Run your multi-agent workflow locally |
290 | 314 |
|
291 | 315 | ::: zone pivot="csharp" |
292 | 316 |
|
293 | | -Before running locally with `dotnet run`, ensure you have configured the required environment variables. You can obtain these values from the Azure AI Foundry portal. |
294 | | -Before running locally with `dotnet run`, ensure you have configured the required environment variables. You can obtain these values from the Azure AI Foundry portal. |
| 317 | +Before you run `dotnet run` locally, set up the needed environment variables. You can get these values from the Azure AI Foundry portal. |
295 | 318 |
|
296 | | - 1. Configure your environment variables based on your operating system: |
| 319 | + 1. Set up your environment variables based on your operating system: |
297 | 320 |
|
298 | 321 | #### [Windows (PowerShell)](#tab/windows-powershell) |
299 | 322 |
|
@@ -345,7 +368,7 @@ Run the application using: |
345 | 368 |
|
346 | 369 | ### Visualize multi-agent workflow execution |
347 | 370 |
|
348 | | -Visualize your multi-agent workflows using the Azure AI Foundry VS Code extension. This allows you to see the interactions between different agents and how they collaborate to achieve the desired outcome. |
| 371 | +Visualize your multi-agent workflows using the Azure AI Foundry VS Code extension. This extension allows you to see the interactions between different agents and how they collaborate to achieve the desired outcome. |
349 | 372 |
|
350 | 373 | To monitor and visualize your multi-agent workflow execution in real-time (currently available for Python interactive mode only): |
351 | 374 |
|
@@ -379,7 +402,7 @@ The following steps outline how to monitor and visualize your multi-agent workfl |
379 | 402 |
|
380 | 403 | 1. Open the Command Palette (`Ctrl+Shift+P`) |
381 | 404 | 1. Run the command: `>Azure AI Foundry: Visualize the Multi-Agent Workflow` |
382 | | - 1. A new tab will open in VS Code displaying the execution graph |
| 405 | + 1. A new tab opens in VS Code displaying the execution graph |
383 | 406 | 1. The visualization updates automatically as your workflow progresses, showing the flow between agents and their interactions. |
384 | 407 |
|
385 | 408 | ::: zone-end |
|
0 commit comments