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/get-started-projects-vs-code.md
+1-199Lines changed: 1 addition & 199 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -288,204 +288,6 @@ Open the model playground using the following steps:
288
288
1. Select the **History** link at the top-left of the playground to view the chat history.
289
289
290
290
291
-
## Work with Azure AI Agent Service
292
-
293
-
After you deploy a model using the VS Code extension, AI Foundry, API, or SDK, you can work with [Azure AI Agent Service](/azure/ai-services/agents/overview). Agents are "smart" microservices that:
294
-
295
-
- Answer questions using their training data or search other sources with Retrieval Augmented Generation (RAG)
296
-
- Perform specific actions
297
-
- Automate complete workflows
298
-
299
-
Agents combine AI models with tools to access and interact with your data.
300
-
301
-
Azure AI Foundry developers can stay productive by developing, testing, and deploying agents in the familiar and powerful environment of VS Code.
302
-
303
-
### Create and edit Azure AI Agents within the designer view
304
-
305
-
Follow these steps to create an Azure AI Agent:
306
-
307
-
1. First, finish the [Get Started](#get-started) section to sign in to your Azure resources and set your default project.
308
-
309
-
1.[Deploy a model](#deploy-a-model) to use with your agent.
310
-
311
-
1. Select your AI Foundry project in the Azure Resources sidebar.
312
-
313
-
1. Under your project, find the **Agents** section.
314
-
315
-
1. Select the **+** (plus) icon next to the **Agents** subsection to create a new AI Agent.
316
-
317
-
:::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.":::
318
-
319
-
1. In the **Save As** dialog box, select a directory and enter a name for your new AI Agent .yaml file.
320
-
321
-
1. Select the **Save Agent File** button to save your AI Agent file.
322
-
323
-
:::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":::
324
-
325
-
### Interact with your agent in the designer
326
-
327
-
After you choose your save location, the Designer view will open to edit your AI Agent.
328
-
329
-
1. Perform the following tasks in the agent designer:
330
-
331
-
1. Enter a name for your agent in the prompt.
332
-
333
-
1. Enter your model deployment name. The deployment name you chose when you deployed an existing model.
334
-
335
-
> [!TIP]
336
-
> 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.
337
-
> :::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":::
338
-
339
-
1. Configure the following fields. The **ID** is generated by the extension:
340
-
341
-
- Add a description for your agent
342
-
- Set system instructions
343
-
- Configure tools for agent use
344
-
345
-
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/agent-designer.png" alt-text="Screenshot of the Agent designer that enables you to edit and interact with your AI Agent." lightbox="../../media/how-to/get-started-projects-vs-code/agent-designer.png":::
346
-
347
-
1. Select the **Save locally** button in the bottom-center of the **Agent Preferences** screen to store your agent configuration.
348
-
349
-
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/save-agent-locally.png" alt-text="Screenshot of the Agent designer with the 'Save locally' button highlighted." lightbox="../../media/how-to/get-started-projects-vs-code/save-agent-locally.png":::
350
-
351
-
### Show the Azure AI Agent YAML definition
352
-
353
-
Select the **Open Yaml File** on the top-right of the designer to open your AI Agent .yaml file. This file contains the details and setup information for your agent, similar to the following .yaml file example:
354
-
355
-
```yml
356
-
version: 1.0.0
357
-
name: BingAgent
358
-
description: Description of the agent
359
-
metadata:
360
-
author: Author Name
361
-
tag: basic
362
-
id: ''
363
-
model:
364
-
id: ''
365
-
options:
366
-
temperature: 1
367
-
top_p: 1
368
-
instructions: Instructions for the agent
369
-
tools: []
370
-
```
371
-
372
-
### Add tools to the Azure AI Agent
373
-
374
-
Azure AI Agent Service has a set of tools that you can use to interact with your data sources, such as:
375
-
- Grounding with Bing search
376
-
- Azure AI Search
377
-
- Azure Functions
378
-
- File retrieval
379
-
- Code interpreter
380
-
381
-
#### Create the tool configuration file
382
-
383
-
The Agent Designer adds tools to an AI Agent via .yaml files.
384
-
385
-
Create a tool configuration .yaml file using the following steps:
386
-
387
-
1. Perform any setup steps that might be required. See the article for the tool you’re interested in using. For example, [Grounding with Bing search](/azure/ai-services/agents/how-to/tools/bing-grounding?tabs=python&pivots=overview#setup).
388
-
389
-
1. Once you complete the setup, create a yaml code file that specifies the tool’s configuration. For example, this format for Grounding with Bing Search:
390
-
391
-
```yml
392
-
type: bing_grounding
393
-
name: bing_search
394
-
configuration:
395
-
tool_connections:
396
-
- >-
397
-
/subscriptions/<Azure Subscription ID>/resourceGroups/<Azure Resource Group name>/providers/Microsoft.MachineLearningServices/workspaces/<Azure AI Foundry Project name>/connections/<Bing connection name>
398
-
```
399
-
1. Replace the placeholders in the connection string under the `tool_connections` section with your information:
400
-
401
-
- Azure Subscription ID
402
-
- Azure Resource Group name
403
-
- Azure AI Foundry Project name
404
-
- Bing connection name
405
-
406
-
1. Save the .yaml file.
407
-
408
-
#### Add the tool to the AI Agent
409
-
410
-
Add a tool to the AI Agent with the following steps:
411
-
412
-
1. Select the **+** (plus) icon next to the **TOOL** section in the designer.
413
-
414
-
:::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":::
415
-
416
-
1. In the file explorer that appears, select the .yaml tool file to use. Select the **Select a tool file** button to add the tool to the agent.
417
-
418
-
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/agent-select-tool-file.png" alt-text="Screenshot of the file explorer with the selected file and the 'Select a tool file' button highlighted." lightbox="../../media/how-to/get-started-projects-vs-code/agent-select-tool-file.png":::
419
-
420
-
1. The tool is displayed in the **TOOL** section.
421
-
422
-
:::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":::
423
-
424
-
1. Select the **Save locally** button in the bottom-center of the **Agent Preferences** screen to store your agent configuration.
425
-
426
-
### Deploy Azure AI Agents to the Azure AI Foundry Studio
427
-
428
-
Deploy your agent directly to Azure AI Foundry with the following steps:
429
-
430
-
1. Select the **Deploy to Azure AI Foundry** button in the bottom-left of the designer.
431
-
432
-
:::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":::
433
-
434
-
1. In the VS Code navbar, refresh the **Azure Resources** view. The deployed agent is displayed under the **Agents** subsection.
435
-
436
-
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/agent-deployed.png" alt-text="Screenshot of the 'Azure Resources' view. The deployed agent is highlighted under the 'Agents' subsection." lightbox="../../media/how-to/get-started-projects-vs-code/agent-deployed.png":::
437
-
438
-
#### View the deployed AI Agent details
439
-
440
-
Selecting the deployed agent opens the **Agent Preferences** page in a view only mode.
441
-
442
-
- Select the **Open Yaml File** to view the yaml definition of the agent.
443
-
444
-
- Select the **Open Playground** button to open the **Agent Playground**.
445
-
446
-
:::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":::
447
-
448
-
449
-
### Interact with Agents using agents playground
450
-
451
-
Open the **Agents Playground** using the following steps:
452
-
453
-
1. Right-click on your deployed agent and select the **Open Playground** option This action starts a thread with your agent and let you send messages.
454
-
455
-
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/agent-open-playground.png" alt-text="Screenshot of the agent context menu with the 'Open Playground' option highlighted." lightbox="../../media/how-to/get-started-projects-vs-code/agent-open-playground.png":::
456
-
457
-
1. The **Playground** page is displayed.
458
-
459
-
:::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":::
460
-
461
-
1. Type your prompt and see the outputs.
462
-
463
-
## Clean up resources
464
-
465
-
The Azure resources that you created in this article are billed to your Azure subscription. If you don't expect to need these resources in the future, delete them to avoid incurring more charges.
466
-
467
-
### Delete your agents
468
-
469
-
Delete the deployed agent in the [online AI Foundry portal](https://ai.azure.com). Select **Agents** from the navigation menu on the left, select your agent, then select the **Delete** button.
470
-
471
-
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/delete-agent.png" alt-text="Screenshot of the AI Foundry portal with 'Agents' from the navigation menu on the left and the **Delete** button highlighted." lightbox="../../media/how-to/get-started-projects-vs-code/delete-agent.png":::
472
-
473
-
### Delete your models
474
-
475
-
1. In the VS Code navbar, refresh the **Azure Resources** view. Expand the **Models** subsection to display the list of deployed models.
476
-
477
-
1. Right-click on your deployed model to delete and select the **Delete** option.
478
-
479
-
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/delete-model.png" alt-text="Screenshot of the model context menu with the 'Delete' option highlighted." lightbox="../../media/how-to/get-started-projects-vs-code/delete-model.png":::
480
-
481
-
### Delete your tools
482
-
483
-
Delete the connected tool with the following steps:
484
-
485
-
1. Open the Azure portal
486
-
1. Select the Azure Resource Group containing the tool.
487
-
1. Select the **Delete** button.
488
-
489
291
## Next steps
490
292
491
-
- Learn about the tools you can use with Azure AI Agents, such as [file search](/azure/ai-services/agents/how-to/tools/file-search?tabs=python&pivots=overview), or [code interpreter](/azure/ai-services/agents/how-to/tools/code-interpreter?tabs=python&pivots=overview).
293
+
- Learn about [working with the Azure AI Agent Service](./vs-code-agents.md) using this Visual Studio Code extension.
0 commit comments