Skip to content

Commit 94f7e0d

Browse files
Merge pull request #6305 from MicrosoftDocs/main
Auto Publish – main to live - 2025-07-30 17:09 UTC
2 parents 09e562f + e199b82 commit 94f7e0d

File tree

12 files changed

+255
-61
lines changed

12 files changed

+255
-61
lines changed

articles/ai-foundry/agents/concepts/threads-runs-messages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Azure AI Foundry Agent Service supports persistent threads, runs, and messages,
1919

2020
When you use an Agent, there are a series of steps that are involved.
2121

22-
- **Creating an agent:** You create an agent to start sending messages and recieving responses.
22+
- **Creating an agent:** You create an agent to start sending messages and receiving responses.
2323
- **Creating a thread:** You create a thread once and append messages to it as users reply. This ensures that the conversation history is maintained and managed automatically.
2424
- **Sending messages:** Messages can be sent by both the agent and the user. These messages can include text, images, and other files, providing a rich interaction experience.
2525
- **Running the agent:** When a run is initiated, the agent processes the messages in the thread and performs tasks based on its configuration. It may append new messages to the thread as part of its response.

articles/ai-foundry/agents/how-to/tools/azure-ai-search.md

Lines changed: 64 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,33 @@ services: azure-ai-agent-service
66
manager: nitinme
77
ms.service: azure-ai-agent-service
88
ms.topic: how-to
9-
ms.date: 06/30/2025
9+
ms.date: 7/28/2025
1010
author: aahill
1111
ms.author: aahi
1212
ms.custom: azure-ai-agents
1313
---
1414

1515
# Use an existing AI Search index with the Azure AI Search tool
1616

17-
Use an existing Azure AI Search index with the agent's Azure AI Search tool.
17+
You can use an existing Azure AI Search index with the agent's Azure AI Search tool.
1818

19-
> [!NOTE]
20-
> Azure AI Search indexes must meet the following requirements:
21-
> - The index must contain at least one searchable & retrievable text field (type Edm.String)
22-
> - The index must contain at least one searchable vector field (type Collection(Edm.Single))
23-
> - The index is assumed to be configured properly
19+
> [!TIP]
20+
> You can create a new index without leaving the Azure AI Foundry portal. For more information, see the [Add the Azure AI Search tool to an agent](#add-the-azure-ai-search-tool-to-an-agent) section.
21+
22+
Azure AI Search indexes must be configured properly and meet the following requirements:
23+
- The index must contain at least one searchable & retrievable text field (type Edm.String)
24+
- The index must contain at least one searchable vector field (type Collection(Edm.Single))
2425

2526
## Search types
27+
2628
You can specify the search type for your index by choosing one of the following
2729
- Simple
2830
- Semantic
2931
- Vector
3032
- Hybrid (Vector + Keyword)
3133
- Hybrid (Vector + Keyword + Semantic)
3234

33-
34-
**Indexes without a specified search type**
35-
- By default, the Azure AI Search tool runs a hybrid search (keyword + vector) on all text fields
35+
You can have indexes without a specified search type. By default, the Azure AI Search tool runs a hybrid search (keyword + vector) on all text fields.
3636

3737
## Usage support
3838

@@ -47,7 +47,7 @@ A prerequisite of using the Azure AI Search tool is to have an existing Azure AI
4747
- [Quickstart: Create a vector index with the import and vectorize data wizard in the Azure portal](../../../../search\search-get-started-portal-import-vectors.md)
4848

4949
### Create a project connection to the Azure AI Search resource with the index you want to use
50-
Once you have completed the agent setup, you must create a project connection to the Azure AI Search resource that contains the index you want to use.
50+
Once you complete the agent setup, you must create a project connection to the Azure AI Search resource that contains the index you want to use.
5151

5252
If you already connected the AI Search resource that contains the index you want to use to your project, skip this step.
5353

@@ -56,13 +56,13 @@ If you already connected the AI Search resource that contains the index you want
5656
- In the Azure portal, navigate to the AI Search resource that contains the index you want to use.
5757
2. Copy the connection endpoint.
5858
- In the Overview tab, copy the URL of your resource. The URL should be in the format `https://<your-resource-name>.search.windows.net/`.
59-
:::image type="content" source="../../media\tools\ai-search\connection-endpoint.png" alt-text="A screenshot of an AI Search resource Overview tab in the Azure portal." lightbox="../../media\tools\ai-search\connection-endpoint.png":::
59+
:::image type="content" source="../../media/tools/ai-search\connection-endpoint.png" alt-text="A screenshot of an AI Search resource Overview tab in the Azure portal." lightbox="../../media/tools/ai-search\connection-endpoint.png":::
6060

6161
3. Verify API Access control is set to **Both** and copy one of the keys under **Manage admin keys**.
6262
- From the left-hand navigation bar, scroll down to the Settings section and select **Keys**.
6363
- Under the **API Access Control** section, ensure the option **Both** API key and Role-based access control is selected.
6464
- If you want the connection to use API Keys for authentication, copy one of the keys under **Manage admin keys**.
65-
:::image type="content" source="../../media\tools\ai-search\azure-portal.png" alt-text="A screenshot of an AI Search resource Keys tab in the Azure portal." lightbox="../../media\tools\ai-search\azure-portal.png":::
65+
:::image type="content" source="../../media/tools/ai-search\azure-portal.png" alt-text="A screenshot of an AI Search resource Keys tab in the Azure portal." lightbox="../../media/tools/ai-search\azure-portal.png":::
6666

6767
#### Create an Azure AI Search project connection
6868
If you use Microsoft Entra ID for the connection authentication type, you need to manually assign the project managed identity the roles Search Index Data Contributor and Search Service Contributor to the Azure AI Search resource. The connection **name** must be the AI Search **index** name.
@@ -71,32 +71,37 @@ If you use Microsoft Entra ID for the connection authentication type, you need t
7171

7272
**Create the following connections.yml file**
7373

74+
You can use either an API key or keyless YAML configuration file. Replace the ```name```, ```endpoint```, and ```api_key``` placeholders with your Azure AI Search resource values. For more information on the YAML configuration file, see the [Azure AI Search connection YAML schema](../../../../machine-learning\reference-yaml-connection-ai-search.md).
7475

75-
You can use either an API key or credential-less YAML configuration file. Replace the placeholders for ```name```, ```endpoint``` and ```api_key``` with your Azure AI Search resource values. For more information on the YAML configuration file, see the [Azure AI Search connection YAML schema](../../../../machine-learning\reference-yaml-connection-ai-search.md).
76-
- API Key example:
76+
Here's an API Key example:
7777

78-
```yml
79-
name: my_project_acs_connection_keys
80-
type: azure_ai_search
81-
endpoint: https://contoso.search.windows.net/
82-
api_key: XXXXXXXXXXXXXXX
83-
```
78+
```yml
79+
name: my_project_acs_connection_keys
80+
type: azure_ai_search
81+
endpoint: https://contoso.search.windows.net/
82+
api_key: XXXXXXXXXXXXXXX
83+
```
8484
85-
- Credential-less
85+
Here's a keyless example:
86+
87+
```yml
88+
name: my_project_acs_connection_credentialless
89+
type: azure_ai_search
90+
endpoint: https://contoso.search.windows.net/
91+
```
8692
87-
```yml
88-
name: my_project_acs_connection_credentialless
89-
type: azure_ai_search
90-
endpoint: https://contoso.search.windows.net/
91-
```
9293
**Then, run the following command:**
9394
9495
Replace ```my_resource``` and ```my_project_name``` with your resource group and project name created in the agent setup.
96+
9597
```azurecli
9698
az ml connection create --file {connection.yml} --resource-group {my_resource_group} --workspace-name {my_project_name}
9799
```
100+
98101
# [Python](#tab/pythonsdk)
99-
Replace the placeholders ```my_connection_name```, ```my_endpoint```, and ```my_key``` (optional) with your Azure AI Search connection details and run the following code to create a project connection to your Azure AI Search resource.
102+
103+
To create a project connection to your Azure AI Search resource, replace the ```my_connection_name```, ```my_endpoint```, and ```my_key``` (optional) placeholders with your Azure AI Search connection details and run the following code:
104+
100105
```python
101106
from azure.ai.ml.entities import AzureAISearchConnection
102107
@@ -114,36 +119,52 @@ ml_client.connections.create_or_update(my_connection)
114119
```
115120

116121
# [Azure AI Foundry](#tab/azureaifoundry)
117-
1. In Azure AI Foundry, navigate to the project you created in the agent setup. Click on **Open in management center**.
118-
:::image type="content" source="../../media\tools\ai-search\project-studio.png" alt-text="A screenshot of a project in Azure AI Foundry." lightbox="../../media\tools\ai-search\project-studio.png":::
119122

120-
2. Click on the **Connections** tab and select **Add Connection**.
121-
:::image type="content" source="../../media\tools\ai-search\project-connections-page.png" alt-text="A screenshot of the project connections page." lightbox="../../media\tools\ai-search\project-connections-page.png":::
123+
1. In Azure AI Foundry, navigate to the project you created in the agent setup. Select **Open in management center**.
124+
:::image type="content" source="../../media/tools/ai-search\project-studio.png" alt-text="A screenshot of a project in Azure AI Foundry." lightbox="../../media/tools/ai-search\project-studio.png":::
125+
126+
1. Select the **Connections** tab and then select **Add Connection**.
127+
:::image type="content" source="../../media/tools/ai-search\project-connections-page.png" alt-text="A screenshot of the project connections page." lightbox="../../media/tools/ai-search\project-connections-page.png":::
122128

123-
3. Select **Azure AI Search**.
124-
:::image type="content" source="../../media\tools\ai-search\select.png" alt-text="A screenshot of the Azure AI Search connection type the user should select." lightbox="../../media\tools\ai-search\select.png":::
129+
1. Select **Azure AI Search**.
130+
:::image type="content" source="../../media/tools/ai-search\select.png" alt-text="A screenshot of the Azure AI Search connection type the user should select." lightbox="../../media/tools/ai-search\select.png":::
125131

126-
4. Provide the required connection details for the Azure AI Search resource you want to use. Both Managed Identity and Key-based authentication are supported. Once all the fields are filled in, click **Add connection**.
127-
:::image type="content" source="../../media\tools\ai-search\connection-2.png" alt-text="A screenshot the required fields to add a new Azure AI Search connection." lightbox="../../media\tools\ai-search\connection-2.png":::
132+
1. Provide the required connection details for the Azure AI Search resource you want to use. Both Managed Identity and Key-based authentication are supported. Once all the fields are filled in, select **Add connection**.
133+
:::image type="content" source="../../media/tools/ai-search\connection-2.png" alt-text="A screenshot the required fields to add a new Azure AI Search connection." lightbox="../../media/tools/ai-search\connection-2.png":::
128134

129-
5. Verify that the connection was successfully created and now appears in the project's Connections tab.
130-
:::image type="content" source="../../media\tools\ai-search\success-connection.png" alt-text="A screenshot of the project connections page with a new Azure AI Search connection added." lightbox="../../media\tools\ai-search\success-connection.png":::
135+
1. Verify that the connection was successfully created and now appears in the project's Connections tab.
136+
:::image type="content" source="../../media/tools/ai-search\success-connection.png" alt-text="A screenshot of the project connections page with a new Azure AI Search connection added." lightbox="../../media/tools/ai-search\success-connection.png":::
131137
---
132138

133-
Now that you have created a project connection to your Azure AI Search resource, you can configure and start using the Azure AI Search tool with the SDK. See the code examples tab to get started.
139+
Now that you created a project connection to your Azure AI Search resource, you can configure and start using the Azure AI Search tool with the SDK. See the code examples tab to get started.
134140

135141
-------------------------
136142
## Add the Azure AI Search tool to an agent
137143

138144
You can add the Azure AI Search tool to an agent programmatically using the code examples listed at the top of this article, or the Azure AI Foundry portal. If you want to use the portal:
139145

140-
1. In the **Agents** screen for your agent, scroll down the **Setup** pane on the right to **knowledge**. Then select **Add**.
146+
1. In the **Agents** screen for your agent, scroll down the **Setup** pane. Then select **Knowledge** > **+ Add**.
147+
148+
:::image type="content" source="../../media/tools/knowledge-tools.png" alt-text="A screenshot showing the available tool categories in the Azure AI Foundry portal." lightbox="../../media/tools/knowledge-tools.png":::
149+
150+
1. Select **Azure AI Search**.
151+
152+
:::image type="content" source="../../media/tools/knowledge-tools-list.png" alt-text="A screenshot showing the available knowledge tools in the Azure AI Foundry portal." lightbox="../../media/tools/knowledge-tools-list.png":::
153+
154+
1. Under **Connect to an index**, you can either select an existing Azure AI Search connection or create a new one. Let's select **Indexes that are not part of this project**.
155+
1. Select an existing Azure AI Search connection. You can create a new one in the Azure portal and then return to this wizard.
156+
1. After you select the connection, you can select or create an index to use with the Azure AI Search tool. Let's select **Create a new index**.
157+
158+
> [!TIP]
159+
> You can create a new index without leaving the Azure AI Foundry portal. If you select **Create a new index**, you're prompted to provide the index name and select the search type.
160+
161+
:::image type="content" source="../../media/tools/knowledge-tools-ai-search-connect-index.png" alt-text="A screenshot with the option to connect to an index that doesn't yet exist in the project." lightbox="../../media/tools/knowledge-tools-ai-search-connect-index.png":::
141162

142-
:::image type="content" source="../../media\tools\knowledge-tools.png" alt-text="A screenshot showing the available tool categories in the Azure AI Foundry portal." lightbox="../../media\tools\knowledge-tools.png":::
163+
1. Enter the index name, connect your data, choose an embedding model, and agree to the terms. Then select **Create index**.
143164

144-
1. Select **Azure AI Search** and follow the prompts to add the tool.
165+
:::image type="content" source="../../media/tools/knowledge-tools-ai-search-create-index.png" alt-text="A screenshot with the option to create a new index in the Azure AI Foundry portal." lightbox="../../media/tools/knowledge-tools-ai-search-create-index.png":::
145166

146-
:::image type="content" source="../../media\tools\knowledge-tools-list.png" alt-text="A screenshot showing the available knowledge tools in the Azure AI Foundry portal." lightbox="../../media\tools\knowledge-tools-list.png":::
167+
1. The index is created and connected to the [Azure AI Search](/azure/search/) service. You can now use the index with the Azure AI Search tool in your agent. You can also use the index outside of the agent, such as the Azure AI Search REST API or SDKs.
147168

148169
## Next steps
149170

186 KB
Loading
173 KB
Loading

0 commit comments

Comments
 (0)