Skip to content

Commit edc88fc

Browse files
committed
Agents section updated
1 parent 4ee4cf6 commit edc88fc

File tree

11 files changed

+124
-14
lines changed

11 files changed

+124
-14
lines changed

articles/ai-foundry/how-to/develop/get-started-projects-vs-code.md

Lines changed: 124 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Deploy a selected model in the model catalog using the following steps:
139139

140140
1. In the top center, select the AI service to use in the **Choose an AI service** dropdown and press enter.
141141

142-
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/choose-ai-service.png" alt-text="Screenshot of the Choose AI service dropdown." lightbox="../../media/how-to/get-started-projects-vs-code/choose-ai-service.png":::
142+
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/choose-ai-service.png" alt-text="Screenshot of the Chosen AI service dropdown." lightbox="../../media/how-to/get-started-projects-vs-code/choose-ai-service.png":::
143143

144144
1. In the top center, select the model version to use in the **Choose model version** dropdown and press enter.
145145

@@ -261,7 +261,7 @@ Create a sample code file using the following steps.
261261

262262
#### Sample code file
263263

264-
The sample code file that demonstrates a basic call to the chat completion API. The call is synchronous:
264+
This Python sample code file that demonstrates a basic call to the chat completion API. The call is synchronous:
265265

266266
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/sample-code-file.png" alt-text="Screenshot of generated sample code file." lightbox="../../media/how-to/get-started-projects-vs-code/sample-code-file.png":::
267267

@@ -296,6 +296,8 @@ After you deploy a model using the VS Code extension, AI Foundry, API, or SDK, y
296296

297297
Agents combine AI models with tools to access and interact with your data.
298298

299+
Azure AI Foundry developers can stay productive by developing, testing, and deploying agents in the familiar and powerful environment of VS Code.
300+
299301
### Create and edit Azure AI Agents within the designer view
300302

301303
#### Create an Azure AI Agent
@@ -310,38 +312,41 @@ Follow these steps to create an Azure AI Agent:
310312

311313
1. Under your project, find the **Agents** section.
312314

313-
1. Click the **+** (plus) icon next to **Agents** to create a new agent.
315+
1. Select the **+** (plus) icon next to the **Agents** subsection to create a new AI Agent.
314316

315317
:::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." lightbox="../../media/how-to/get-started-projects-vs-code/select-agent-plus.png":::
316318

317-
1. In the **Save As** dialog box select a directory and enter a name for your new AI Agent .yaml file.
319+
1. In the **Save As** dialog box, select a directory and enter a name for your new AI Agent .yaml file.
318320

319321
1. Select the **Save Agent File** button to save your AI Agent file.
320322

321323
:::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":::
322324

323325
### Interact with your agent in the designer
324326

325-
1. The agent designer will open, where you can:
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:
326330

327331
1. Enter a name for your agent in the prompt.
328332

329-
1. Enter your deployed model name to power your agent from the dropdown menu.
333+
1. Enter your deployed model name.
330334

331335
> [!TIP]
332336
> The deployed model name must be the exact name of the model you deployed in your Azure AI Foundry project.
333337
334-
1. Configure and test.
338+
1. Configure the following fields:
335339

336-
- Add a description for your agent
337-
- Set system instructions
338-
- Configure tools the agent can use
339-
- Test your agent's responses
340+
- Add a description for your agent
341+
- Set system instructions
342+
- Configure tools for agent use
340343

341-
:::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":::
344+
:::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":::
342345

343346
1. Select the **Save locally** button in the bottom-center of the **Agent Preferences** screen to store your agent configuration.
344347

348+
:::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":::
349+
345350
### Show the Azure AI Agent YAML definition
346351

347352
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:
@@ -374,16 +379,121 @@ instructions: Instructions for the agent
374379
tools: []
375380
```
376381
382+
### Add tools to the Azure AI Agent
383+
384+
Azure AI Agent Service has a set of tools that you can use to interact with your data sources, such as:
385+
- Bing
386+
- Azure AI Search
387+
- Azure Functions
388+
- Azure OpenAI Assistant File retrieval tool
389+
- Azure OpenAI Assistant code interpreter tools
390+
391+
#### Create the tool configuration file
392+
393+
The Agent Designer adds tools to an AI Agent via .yaml files.
394+
395+
Create a tool configuration .yaml file using the following steps:
396+
397+
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).
398+
399+
1. Once you complete the setup, create a yaml code file that specifies the tool’s configuration using this format:
400+
401+
```yml
402+
type: bing_grounding
403+
name: bing_search
404+
configuration:
405+
tool_connections:
406+
- >-
407+
/subscriptions/<Azure Subscription ID>/resourceGroups/<Azure Resource Group name>/providers/Microsoft.MachineLearningServices/workspaces/<Azure AI Foundry Project name>/connections/<Bing connection name>
408+
```
409+
1. Replace the placeholders in the connection string under the `tool_connections` section with your information:
410+
411+
- Azure Subscription ID
412+
- Azure Resource Group name
413+
- Azure AI Foundry Project name
414+
- Bing connection name
415+
416+
1. Save the .yaml file.
417+
418+
#### Add the tool to the AI Agent
419+
420+
Add a tool to the AI Agent with the following steps:
421+
422+
1. Select the **+** (plus) icon next to the **TOOL** section in the designer.
423+
424+
:::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":::
425+
426+
1. In the file explorer that appears, select the .yaml tool file to use.
427+
428+
:::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":::
429+
430+
1. The tool is displayed in the **TOOL** section.
431+
432+
:::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":::
433+
434+
1. Select the **Save locally** button in the bottom-center of the **Agent Preferences** screen to store your agent configuration.
377435

378436
### Deploy Azure AI Agents to the Azure AI Foundry Studio
379437

380-
### Add tools to the Azure AI Agent
438+
Deploy your agent directly to Azure AI Foundry with the following steps:
439+
440+
1. Select the **Deploy to Azure AI Foundry** button in the bottom-right of the designer.
381441

442+
:::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":::
443+
444+
1. In the VS Code navbar, refresh the **Azure Resources** view. The deployed agent is displayed under the **Agents** subsection.
445+
446+
:::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":::
447+
448+
#### View the deployed AI Agent details
449+
450+
Selecting the deployed agent opens the **Agent Preferences** page in a view only mode.
451+
452+
- Select the **Open Yaml File** to view the yaml definition of the agent.
453+
454+
- Select the **Open Playground** button to open the **Agent Playground**.
455+
456+
:::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":::
382457

383458

384459
### Interact with Agents using agents playground
385460

461+
Open the **Agents Playground** using the following steps:
462+
463+
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.
464+
465+
:::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":::
466+
467+
1. The **Playground** page is displayed.
468+
469+
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/agent-display-playground.png" alt-text="Screenshot of the **Playground** page in VS Code." lightbox="../../media/how-to/get-started-projects-vs-code/agent-display-playground.png":::
470+
471+
1. Type your prompt and see the outputs.
472+
386473
## Clean up resources
387474

388-
## Next step
475+
### Delete your agents
476+
477+
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.
478+
479+
:::image type="content" source="../../media/how-to/get-started-projects-vs-code/agent-display-playground.png" alt-text="Screenshot of the **Playground** page in VS Code." lightbox="../../media/how-to/get-started-projects-vs-code/delete-agent.png":::
480+
481+
### Delete your models
482+
483+
1. In the VS Code navbar, refresh the **Azure Resources** view. Expand the **Models** subsection to display the list of deployed models.
484+
485+
1. Right-click on your deployed model to delete and select the **Delete** option.
486+
487+
:::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":::
488+
489+
### Delete your tools
490+
491+
Delete the connected tool with the following steps:
492+
493+
1. Open the Azure portal
494+
1. Select the Azure Resource Group containing the tool.
495+
1. Select the **Delete** button.
496+
497+
## Next steps
389498

499+
- 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).
39 KB
Loading
39.2 KB
Loading
7.04 KB
Loading
7.39 KB
Loading
24.5 KB
Loading
32.4 KB
Loading
48.3 KB
Loading
23.1 KB
Loading
22.9 KB
Loading

0 commit comments

Comments
 (0)