You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-foundry/how-to/develop/vs-code-agents.md
+45-22Lines changed: 45 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ content_well_notification:
8
8
- AI-contribution
9
9
ai-usage: ai-assisted
10
10
ms.topic: how-to
11
-
ms.date: 05/07/2025
11
+
ms.date: 07/10/2025
12
12
ms.reviewer: erichen
13
13
ms.author: johalexander
14
14
author: ms-johnalex
@@ -42,12 +42,6 @@ Follow these steps to create an Azure AI Agent:
42
42
43
43
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/select-agent-plus.png" alt-text="Screenshot of the plus sign next to the Agents subsection.":::
44
44
45
-
1. In the **Save As** dialog box, select a directory and enter a name for your new AI Agent .yaml file.
46
-
47
-
1. Select the **Save Agent File** button to save your AI Agent file.
48
-
49
-
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/enter-agent-name.png" alt-text="Screenshot of the VS Code Save As dialog to save the agent yaml file." lightbox="../../media/how-to/get-started-projects-vs-code/enter-agent-name.png":::
50
-
51
45
### Interact with your agent in the designer
52
46
53
47
After you choose your save location, both the agent .yaml file and the Designer view will open to edit your AI Agent.
@@ -56,11 +50,7 @@ After you choose your save location, both the agent .yaml file and the Designer
56
50
57
51
1. Enter a name for your agent in the prompt.
58
52
59
-
1. Enter your model deployment name. The deployment name you chose when you deployed an existing model.
60
-
61
-
> [!TIP]
62
-
> The model deployment name must be the exact name you chose for the model you deployed in your Azure AI Foundry project. In the following image, `gpt-4o-1` is the model deployment name you chose at deployment. `gpt-4o` is the model name.
63
-
> :::image type="content" source="../../media/how-to/get-started-projects-vs-code/deployment-model-name.png" alt-text="Screenshot of the highlighted deployment model names, an arrow between them, and the model name highlighted in a different color." lightbox="../../media/how-to/get-started-projects-vs-code/deployment-model-name.png":::
53
+
1. Select your model deployment name from the dropdown. The deployment name is what you chose when you deployed an existing model.
64
54
65
55
1. Configure the following fields. The **ID** is generated by the extension:
66
56
@@ -115,7 +105,7 @@ The following tools are available:
- [Azure AI Agents function calling](/azure/ai-services/agents/how-to/tools/function-calling?pivots=python)
108
+
- [Azure AI Agents function calling](/azure/ai-services/agents/how-to/tools/function-calling?pivots=python)
119
109
120
110
Azure AI Foundry Agent Service has a set of knowledge and action tools that you can use to interact with your data sources, such as:
121
111
- [Grounding with Bing search](/azure/ai-services/agents/how-to/tools/bing-grounding?tabs=python&pivots=overview)
@@ -156,7 +146,7 @@ Create a tool configuration .yaml file using the following steps:
156
146
157
147
Add a tool to the AI Agent with the following steps:
158
148
159
-
1. Select the **+** (plus) icon next to the **TOOL** section in the designer.
149
+
1. Select the **Add tool** button in the top-right corner of the **TOOL** section in the designer to show the dropdown. Choose the tool you want to add.
160
150
161
151
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/agent-tool-plus.png" alt-text="Screenshot of the Agent designer TOOL section with the plus icon highlighted." lightbox="../../media/how-to/get-started-projects-vs-code/agent-tool-plus.png":::
162
152
@@ -168,14 +158,14 @@ Add a tool to the AI Agent with the following steps:
168
158
169
159
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/agent-added-tool.png" alt-text="Screenshot of the Agent designer TOOL section with the new tool highlighted." lightbox="../../media/how-to/get-started-projects-vs-code/agent-added-tool.png":::
170
160
171
-
1. To save the .yaml file, select **File** > **Save** in the VS Code menu bar.
161
+
1. To save the tool .yaml file, select **File** > **Save** in the VS Code menu bar.
172
162
173
163
174
-
### Deploy Azure AI Agents to the Azure AI Foundry Studio
164
+
### Create Azure AI Agents on the Azure AI Foundry Studio
175
165
176
-
Deploy your agent directly to Azure AI Foundry with the following steps:
166
+
Create your agent directly on Azure AI Foundry with the following steps:
177
167
178
-
1. Select the **Deploy to Azure AI Foundry** button in the bottom-left of the designer.
168
+
1. Select the **Create on Azure AI Foundry** button in the bottom-left of the designer.
179
169
180
170
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/agent-deploy.png" alt-text="Screenshot of the Agent designer with the 'Deploy to Azure AI Foundry' button highlighted." lightbox="../../media/how-to/get-started-projects-vs-code/agent-deploy.png":::
181
171
@@ -187,11 +177,44 @@ Deploy your agent directly to Azure AI Foundry with the following steps:
187
177
188
178
Selecting the deployed agent opens the **Agent Preferences** page in a view only mode.
189
179
190
-
- Select the **Open Yaml File** to view the yaml definition of the agent.
191
-
180
+
- Select the **Edit Agent** button to view the Agent designer and yaml definition of the agent for editing.
181
+
- Select the **Open Code File** button to create a sample code file that uses the agent.
192
182
- Select the **Open Playground** button to open the **Agent Playground**.
193
183
194
-
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/deployed-agent-view.png" alt-text="Screenshot of the Agent Preferences page with the 'Open Yaml File' and 'Open Playground' buttons highlighted." lightbox="../../media/how-to/get-started-projects-vs-code/deployed-agent-view.png":::
184
+
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/deployed-agent-view.png" alt-text="Screenshot of the Agent Preferences page with the 'Edit Agent', 'Open Code File', and 'Open Playground' buttons highlighted." lightbox="../../media/how-to/get-started-projects-vs-code/deployed-agent-view.png":::
185
+
186
+
### Edit and update the deployed AI Agent
187
+
188
+
To edit the deployed agent, select the **Edit Agent** button in the **Agent Preferences** page. The agent designer opens with the agent .yaml file.
189
+
Edit the agent's configuration, such as the model, tools, and instructions. After you finish editing, select the **Update on Azure AI Foundry** button in the lower left corner to save your changes.
190
+
191
+
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/update-agent.png" alt-text="Screenshot of the Agent Preferences page with the 'Update on Azure AI Foundry' button highlighted." lightbox="../../media/how-to/get-started-projects-vs-code/update-agent.png":::
192
+
193
+
### Explore the agent sample code
194
+
195
+
Create a sample code file using the following steps.
196
+
197
+
1. Right-click on your deployed agent and select the **Open Code File** option or select the **Open Code File** button in the **Agent Preferences** page.
198
+
199
+
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/open-agent-code-file.png" alt-text="Screenshot of the agent context menu with the Open Code file option highlighted." lightbox="../../media/how-to/get-started-projects-vs-code/open-agent-code-file.png":::
200
+
201
+
1. In the top center, select your preferred SDK to use in the **Choose preferred SDK** dropdown and press Enter.
202
+
203
+
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/choose-agent-preferred-sdk.png" alt-text="Screenshot of the Choose preferred SDK dropdown for agent code file selection." lightbox="../../media/how-to/get-started-projects-vs-code/choose-agent-preferred-sdk.png":::
204
+
205
+
1. In the top center, select your preferred language to use in the **Choose language** dropdown and press Enter.
206
+
207
+
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/choose-agent-language.png" alt-text="Screenshot of the Choose language dropdown for agent code file selection." lightbox="../../media/how-to/get-started-projects-vs-code/choose-agent-language.png":::
208
+
209
+
1. In the top center, select your preferred authentication method to use in the **Choose auth method** dropdown and press Enter.
210
+
211
+
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/choose-agent-authn-method.png" alt-text="Screenshot of the Choose authentication method dropdown for agent code file selection." lightbox="../../media/how-to/get-started-projects-vs-code/choose-agent-authn-method.png":::
212
+
213
+
#### Explore the sample code file
214
+
215
+
This Python sample code file that demonstrates a basic call to interact with the agent through the AI Foundry projects API:
@@ -204,7 +227,7 @@ Open the **Agents Playground** using the following steps:
204
227
205
228
1. The **Playground** page is displayed.
206
229
207
-
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/agent-display-playground.png" alt-text="Screenshot of the **Agents Playground** page in VS Code." lightbox="../../media/how-to/get-started-projects-vs-code/agent-display-playground.png":::
230
+
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/agent-display-playground.png" alt-text="Screenshot of the **Agents Playground** VS Code page." lightbox="../../media/how-to/get-started-projects-vs-code/agent-display-playground.png":::
208
231
209
232
1. Type your prompt and see the outputs. The **Grounding with Bing search** tool is used to search the web for information. The agent uses the model and tools you configured in the agent designer. The source of the information is displayed in the **Agent Annotations** section, highlighted in the following image.
0 commit comments