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
-[Fabric Data Agent tool](#fabric-data-agent-tool)
46
+
-[Create a Fabric Capacity](#create-a-fabric-capacity)
47
+
-[Create a Lakehouse data repository](#create-a-lakehouse-data-repository)
48
+
-[Add a data agent to the Fabric](#add-a-data-agent-to-the-fabric)
49
+
-[Create a Fabric connection in Microsoft Foundry](#create-a-fabric-connection-in-microsoft-foundry)
50
+
-[Using Microsoft Fabric tool](#using-microsoft-fabric-tool)
51
+
-[A2ATool](#a2atool)
52
+
-[Create a connection to A2A agent](#create-a-connection-to-a2a-agent)
53
+
-[Using A2A Tool](#using-a2a-tool)
42
54
-[Tracing](#tracing)
43
55
-[Tracing to Azure Monitor](#tracing-to-azure-monitor)
44
56
-[Tracing to Console](#tracing-to-console)
@@ -1112,6 +1124,8 @@ Playwright is a Node.js library for browser automation. Microsoft provides the [
1112
1124
4. Provide a name, then paste your Access Token into the **Key** field.
1113
1125
5. Set the Playwright Workspace Browser endpoint as the **Target URI**. You can find this endpoint on the Workspace **Overview page**. It begins with `wss://`.
1114
1126
1127
+
### Using Browser automation tool
1128
+
1115
1129
Please note that Browser automation operations may take longer than typical calls to process. Using background mode for Responses or applying a network timeout of at least five minutes for non-background calls is highly recommended.
As a prerequisite to this example, we will need to create Microsoft Fabric with Lakehouse data repository. Please see the end-to end tutorials on using Microsoft Fabric [here](https://learn.microsoft.com/fabric/fundamentals/end-to-end-tutorials) for more information.
1249
+
1250
+
### Create a Fabric Capacity
1251
+
1252
+
1. Create a **Fabric Capacity** resource in the Azure Portal **(attention, the rate is being applied!)**.
1253
+
2. Create the workspace in [Power BI portal](https://msit.powerbi.com/home) by clicking **Workspaces** icon on the left panel.
1254
+
3. At the bottom click **+ New workspace**.
1255
+
4. At the right panel populate the name of a workspace, select **Fabric capacity** as a **License mode**; in the **Capacity** dropdown select Fabric Capacity resource we have just created.
1256
+
5. Click **Apply**.
1257
+
1258
+
### Create a Lakehouse data repository
1259
+
1260
+
1. Click a **Lakehouse** icon in **Other items you can create with Microsoft Fabric** section and name the new data repository.
1261
+
2. Download the [public holidays data set](https://github.com/microsoft/fabric-samples/raw/refs/heads/main/docs-samples/data-engineering/Lakehouse/PublicholidaysSample/publicHolidays.parquet).
1262
+
3. At the Lakehouse menu select **Get data > Upload files** and upload the `publicHolidays.parquet`.
1263
+
4. In the **Files** section, click on three dots next to uploaded file and click **Load to Tables > new table** and then **Load** in the opened window.
1264
+
5. Delete the uploaded file, by clicking three dots and selecting **Delete**.
1265
+
1266
+
### Add a data agent to the Fabric
1267
+
1268
+
1. At the top panel select **Add to data agent > New data agent** and name the newly created Agent.
1269
+
2. In the open view on the left panel select the Lakehouse "publicholidays" table and set a checkbox next to it.
1270
+
4. Ask the question we will further use in the Requests API. "What was the number of public holidays in Norway in 2024?"
1271
+
5. The Agent should show a table containing one column called "NumberOfPublicHolidays" with the single row, containing number 62.
1272
+
6. Click **Publish** and in the description add "Agent has data about public holidays." If this stage was omitted the error, saying "Stage configuration not found." will be returned during sample run.
1273
+
1274
+
### Create a Fabric connection in Microsoft Foundry.
1275
+
1276
+
After we have created the Fabric data Agent, we can connect fabric to our Microsoft Foundry.
1277
+
1. Open the [Power BI](https://msit.powerbi.com/home) and select the workspace we have created.
1278
+
2. In the open view select the Agent we have created.
1279
+
3. The URL of the opened page will look like `https://msit.powerbi.com/groups/%workspace_id%/aiskills/%artifact_id%?experience=power-bi`, where `workspace_id` and `artifact_id` are GUIDs in a form like `811acded-d5f7-11f0-90a4-04d3b0c6010a`.
1280
+
4. In the **Microsoft Foundry** you are using for the experimentation, on the left panel select **Management center**.
1281
+
5. Choose **Connected resources**.
1282
+
6. Create a new connection of type **Microsoft Fabric**.
1283
+
7. Populate **workspace-id** and **artifact-id** fields with GUIDs found in the Microsoft Data Agent URL and name the new connection.
1284
+
1285
+
### Using Microsoft Fabric tool
1286
+
1287
+
To use the Agent with Microsoft Fabric tool, we need to include `MicrosoftFabricAgentTool` into `PromptAgentDefinition`.
The [A2A or Agent2Agent](https://a2a-protocol.org/latest/) protocol is designed to enable seamless communication between agents. In the scenario below we assume that we have the application endpoint, which complies with A2A; the authentication is happening through header `x-api-key` value.
1308
+
1309
+
### Create a connection to A2A agent
1310
+
1311
+
1. In the **Microsoft Foundry** you are using for the experimentation, on the left panel select **Management center**.
1312
+
2. Choose **Connected resources**.
1313
+
3. Create a new connection of type **Custom keys**.
1314
+
4. Add two key-value pairs:
1315
+
* x-api-key: \<your key\>
1316
+
* type: custom_A2A
1317
+
5. Name and save the connection.
1318
+
1319
+
### Using A2A Tool
1320
+
1321
+
To use the Agent with A2A tool, we need to include `A2ATool` into `PromptAgentDefinition`.
**Note:** The tracing functionality is currently in preview with limited scope. Only agent creation operations generate dedicated gen_ai traces currently. As a preview feature, the trace structure including spans, attributes, and events may change in future releases.
# Sample for use of an Agent with Fabric Data Agent in Azure.AI.Projets.OpenAI.
2
+
3
+
As a prerequisite to this example, we will need to create Microsoft Fabric with Lakehouse data repository. Please see the end-to end tutorials on using Microsoft Fabric [here](https://learn.microsoft.com/fabric/fundamentals/end-to-end-tutorials) for more information.
4
+
5
+
## Create a Fabric Capacity
6
+
7
+
1. Create a **Fabric Capacity** resource in the Azure Portal **(attention, the rate is being applied!)**.
8
+
2. Create the workspace in [Power BI portal](https://msit.powerbi.com/home) by clicking **Workspaces** icon on the left panel.
9
+
3. At the bottom click **+ New workspace**.
10
+
4. At the right panel populate the name of a workspace, select **Fabric capacity** as a **License mode**; in the **Capacity** dropdown select Fabric Capacity resource we have just created.
11
+
5. Click **Apply**.
12
+
13
+
## Create a Lakehouse data repository
14
+
15
+
1. Click a **Lakehouse** icon in **Other items you can create with Microsoft Fabric** section and name the new data repository.
16
+
2. Download the [public holidays data set](https://github.com/microsoft/fabric-samples/raw/refs/heads/main/docs-samples/data-engineering/Lakehouse/PublicholidaysSample/publicHolidays.parquet).
17
+
3. At the Lakehouse menu select **Get data > Upload files** and upload the `publicHolidays.parquet`.
18
+
4. In the **Files** section, click on three dots next to uploaded file and click **Load to Tables > new table** and then **Load** in the opened window.
19
+
5. Delete the uploaded file, by clicking three dots and selecting **Delete**.
20
+
21
+
## Add a data agent to the Fabric
22
+
23
+
1. At the top panel select **Add to data agent > New data agent** and name the newly created Agent.
24
+
2. In the open view on the left panel select the Lakehouse "publicholidays" table and set a checkbox next to it.
25
+
4. Ask the question we will further use in the Requests API. "What was the number of public holidays in Norway in 2024?"
26
+
5. The Agent should show a table containing one column called "NumberOfPublicHolidays" with the single row, containing number 62.
27
+
6. Click **Publish** and in the description add "Agent has data about public holidays." If this stage was omitted the error, saying "Stage configuration not found." will be returned during sample run.
28
+
29
+
## Create a Fabric connection in Microsoft Foundry
30
+
31
+
After we have created the Fabric data Agent, we can connect fabric to our Microsoft Foundry.
32
+
1. Open the [Power BI](https://msit.powerbi.com/home) and select the workspace we have created.
33
+
2. In the open view select the Agent we have created.
34
+
3. The URL of the opened page will look like `https://msit.powerbi.com/groups/%workspace_id%/aiskills/%artifact_id%?experience=power-bi`, where `workspace_id` and `artifact_id` are GUIDs in a form like `811acded-d5f7-11f0-90a4-04d3b0c6010a`.
35
+
4. In the **Microsoft Foundry** you are using for the experimentation, on the left panel select **Management center**.
36
+
5. Choose **Connected resources**.
37
+
6. Create a new connection of type **Microsoft Fabric**.
38
+
7. Populate **workspace-id** and **artifact-id** fields with GUIDs found in the Microsoft Data Agent URL and name the new connection.
39
+
40
+
41
+
## Run the sample
42
+
43
+
To enable your Agent to access Microsoft Fabric Data Agent, use `MicrosoftFabricAgentTool`.
44
+
45
+
1. First, create an Agent client and read the environment variables, which will be used in the next steps.
2. Use the Microsoft Fabric connection name as it is shown in the connections section of Microsoft Foundry to get the connection. Get the connection ID to initialize the `FabricDataAgentToolOptions`, which will be used to create `MicrosoftFabricAgentTool`.
# Sample for use of an Agent with Fabric Data Agent in Azure.AI.Projets.OpenAI.
2
+
3
+
The [A2A or Agent2Agent](https://a2a-protocol.org/latest/) protocol is designed to enable seamless communication between agents. In the scenario below we assume that we have the application endpoint, which complies with A2A; the authentication is happening through header `x-api-key` value.
4
+
5
+
## Create a connection to A2A agent
6
+
7
+
1. In the **Microsoft Foundry** you are using for the experimentation, on the left panel select **Management center**.
8
+
2. Choose **Connected resources**.
9
+
3. Create a new connection of type **Custom keys**.
10
+
4. Add two key-value pairs:
11
+
* x-api-key: \<your key\>
12
+
* type: custom_A2A
13
+
5. Name and save the connection.
14
+
15
+
16
+
## Run the sample
17
+
18
+
To enable your Agent communication to the A2A endpoint, use `A2ATool`.
19
+
20
+
1. First, create an Agent client and read the environment variables, which will be used in the next steps.
0 commit comments