Skip to content

Commit 95e4727

Browse files
committed
Merge branch 'main' into release-preview-2-cu
2 parents 841d671 + 4c3181c commit 95e4727

File tree

10 files changed

+168
-100
lines changed

10 files changed

+168
-100
lines changed
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
title: Monitor Azure AI Agent Service
3+
description: Start here to learn how to use Azure Monitor to capture and analyze metrics for your Azure AI Agent Service.
4+
ms.date: 03/20/2025
5+
ms.custom: horz-monitor, subject-monitoring
6+
ms.topic: conceptual
7+
author: aahill
8+
ms.author: aahi
9+
ms.service: azure-ai-agent-service
10+
---
11+
12+
# Monitor Azure AI Agent Service
13+
14+
[!INCLUDE [horz-monitor-intro](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-intro.md)]
15+
16+
Monitoring is available for agents in a [standard agent setup](../quickstart.md?pivots=programming-language-csharp#choose-basic-or-standard-agent-setup).
17+
18+
## Dashboards
19+
20+
Azure AI Agent Service provides out-of-box dashboards. There are two key dashboards to monitor your resource:
21+
22+
- The metrics dashboard in the AI Foundry resource view
23+
- The dashboard in the overview pane within the Azure portal
24+
25+
To access the monitoring dashboards, sign in to the [Azure portal](https://portal.azure.com) and then select **Monitoring** in the left navigation menu, then click **Metrics**.
26+
27+
28+
:::image type="content" source="../media/monitoring/dashboard.png" alt-text="Screenshot that shows out-of-box dashboards for a resource in the Azure portal." lightbox="../media/monitoring/dashboard.png" border="false":::
29+
30+
## Azure monitor platform metrics
31+
32+
Azure Monitor provides platform metrics for most services. These metrics are:
33+
34+
* Individually defined for each namespace.
35+
* Stored in the Azure Monitor time-series metrics database.
36+
* Lightweight and capable of supporting near real-time alerting.
37+
* Used to track the performance of a resource over time.
38+
* Collection: Azure Monitor collects platform metrics automatically. No configuration is required.
39+
40+
For a list of all metrics it's possible to gather for all resources in Azure Monitor, see [Supported metrics in Azure Monitor](/azure/azure-monitor/platform/metrics-supported).
41+
42+
Azure AI Agent Service has commonality with a subset of Azure AI services. For a list of available metrics for Azure AI Agent Service, see the [monitoring data reference](../reference/monitor-service.md#metrics).
43+
44+
## Analyze monitoring data
45+
46+
There are many tools for analyzing monitoring data.
47+
48+
### Azure Monitor tools
49+
50+
Azure Monitor supports the [metrics explorer](/azure/azure-monitor/essentials/metrics-getting-started), a tool in the Azure portal that allows you to view and analyze metrics for Azure resources. For more information, see Analyze metrics with Azure Monitor metrics explorer.
51+
52+
## Azure Monitor export tools
53+
54+
You can get data out of Azure Monitor into other tools by using the [REST API for metrics](/rest/api/monitor/operation-groups) to extract metric data from the Azure Monitor metrics database. The API supports filter expressions to refine the data retrieved. For more information, see [Azure Monitor REST API reference](/rest/api/monitor/filter-syntax).
55+
56+
To get started with the REST API for Azure Monitor, see [Azure monitoring REST API walkthrough](/azure/azure-monitor/essentials/rest-api-walkthrough).
57+
58+
## Alerts
59+
60+
Azure Monitor alerts proactively notify you when specific conditions are found in your monitoring data. Alerts allow you to identify and address issues in your system before your customers notice them. For more information, see Azure Monitor alerts.
61+
62+
There are many sources of common alerts for Azure resources. [The Azure Monitor Baseline Alerts (AMBA)](https://aka.ms/amba) site provides a semi-automated method of implementing important platform metric alerts, dashboards, and guidelines. The site applies to a continually expanding subset of Azure services, including all services that are part of the Azure Landing Zone (ALZ).
63+
64+
The common alert schema standardizes the consumption of Azure Monitor alert notifications. For more information, see [Common alert schema](/azure/azure-monitor/alerts/alerts-common-schema).
65+
66+
[Metric alerts](/azure/azure-monitor/alerts/alerts-types#metric-alerts) evaluate resource metrics at regular intervals. Metric alerts can also apply multiple conditions and dynamic thresholds.
67+
68+
Every organization's alerting needs vary and can change over time. Generally, all alerts should be actionable and have a specific intended response if the alert occurs. If an alert doesn't require an immediate response, the condition can be captured in a report rather than an alert. Some use cases might require alerting anytime certain error conditions exist. In other cases, you might need alerts for errors that exceed a certain threshold for a designated time period.
69+
70+
Depending on what type of application you're developing with your use of Azure AI Agent Service, [Azure Monitor Application Insights](/azure/azure-monitor/overview) might offer more monitoring benefits at the application layer.
71+
72+
### Azure AI Agent service alert rules
73+
74+
You can set alerts for any metric listed in the [monitoring data reference](../reference/monitor-service.md).
75+
76+
[!INCLUDE [horz-monitor-advisor-recommendations](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-advisor-recommendations.md)]
77+
78+
## Related content
79+
80+
- See [Monitoring data reference](../reference/monitor-service.md) for a reference of the metrics and other important values created for Azure AI Agent Service.
81+
- See [Monitoring Azure resources with Azure Monitor](/azure/azure-monitor/essentials/monitor-azure-resource) for general details on monitoring Azure resources.

articles/ai-services/agents/how-to/use-your-own-resources.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Replace the parameter value for `aiServiceAccountResourceId` with the full arm r
4141

4242
The value returned is the `aiServiceAccountResourceId` you need to use in the template.
4343

44-
2. In the basic agent template file, replace the following placeholders:
44+
3. In the basic agent template file, replace the following placeholders:
4545

4646
```
4747
aiServiceAccountResourceId:/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{serviceName}
@@ -74,9 +74,10 @@ Use an existing AI Services / Azure OpenAI, Azure Storage account, Azure Cosmos
7474
```az login```
7575
2. Then run the command:
7676
77-
```az search service show --resource-group <your-resource-group> --name <your-storage-account> --query "id" --output tsv```
78-
77+
```az storage account show --resource-group <your-resource-group> --name <your-storage-account> --query "id" --output tsv```
78+
7979
The output is the `aiStorageAccountResourceID` you need to use in the template.
80+
8081
3. In the standard agent template file, replace the following placeholders:
8182
8283
```
175 KB
Loading
196 KB
Loading
54 KB
Loading
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
title: Monitoring data reference for Azure AI Agent Service
3+
description: This article contains important reference material you need when you monitor Azure AI Agent Service by using Azure Monitor.
4+
ms.date: 03/24/2025
5+
ms.custom: horz-monitor, subject-monitoring
6+
ms.topic: reference
7+
author: aahill
8+
ms.author: aahi
9+
ms.service: azure-ai-agent-service
10+
---
11+
12+
# Azure AI Agent Service monitoring data reference
13+
14+
[!INCLUDE [horz-monitor-ref-intro](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-intro.md)]
15+
16+
See [Monitor Azure AI Agent Service](../how-to/metrics.md) for details on the data you can collect on your agents.
17+
18+
## Metrics
19+
20+
Here are the most important metrics we think you should monitor for Azure AI Agent Service. Later in this article is a longer list of all available metrics which contains more details on metrics in this shorter list. _See the below list for most up to date information. We're working on refreshing the tables in the following sections._
21+
22+
- [Runs](#category-agents)
23+
- [Indexed files](#category-agents)
24+
<!-- - Indexed files -->
25+
26+
## Supported metrics
27+
28+
This section lists all the automatically collected platform metrics for this service. These metrics are also part of the global list of [all platform metrics supported in Azure Monitor](/azure/azure-monitor/reference/supported-metrics/metrics-index#supported-metrics-per-resource-type).
29+
30+
[!INCLUDE [horz-monitor-ref-metrics-tableheader](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-metrics-tableheader.md)]
31+
[!INCLUDE [Microsoft.MachineLearningServices/workspaces](~/reusable-content/ce-skilling/azure/includes/azure-monitor/reference/metrics/microsoft-machinelearningservices-workspaces-metrics-include.md)]
32+
33+
## Category: Agents
34+
35+
36+
|Metric |Name in REST API |Unit | Aggregation | Dimension | Time grains | DS Export |
37+
|---------|---------|---------|---------|---------|---------|---------|
38+
|Runs <br> The number of runs in a given timeframe. | `Runs` | Count | Total (sum), Average, Minimum, Maximum, Count | `ResourceId`, `ProjectId`, `AgentId`, `StreamType`, `Region`, `StatusCode (successful, clienterrors, server errors)`, `RunStatus (started, completed, failed, cancelled, expired)` | PT1M | Yes |
39+
|Indexed files <br> Number of files indexed for file search | `IndexedFiles` | Count | Count, Average, Minimum, Maximum | `ResourceId`, `ProjectId`, `VectorStoreId`, `StreamType`, `Region`, `Status`, `ErrorCode` | PT1M | Yes |
40+
41+
42+
## Related content
43+
44+
- See [Monitor Azure AI Agent Service](../how-to/metrics.md) for a description of monitoring Azure AI Agent Service.
45+
- See [Monitor Azure resources with Azure Monitor](/azure/azure-monitor/essentials/monitor-azure-resource) for details on monitoring Azure resources.

articles/ai-services/agents/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ items:
5858
href: ../openai/how-to/content-filters.md?context=/azure/ai-services/agents/context/context
5959
- name: Use virtual networks
6060
href: how-to/virtual-networks.md
61+
- name: Service monitoring
62+
href: how-to/metrics.md
6163
- name: Use the Visual Studio Code extension
6264
href: ../../ai-foundry/how-to/develop/vs-code-agents.md?context=/azure/ai-services/agents/context/context
6365
- name: Responsible AI
@@ -84,6 +86,8 @@ items:
8486
href: https://github.com/openai/openai-dotnet/blob/main/README.md
8587
- name: Python
8688
href: https://github.com/openai/openai-python/blob/main/README.md
89+
- name: Data monitoring reference
90+
href: reference/monitor-service.md
8791
- name: Resources
8892
items:
8993
- name: Support and help options

articles/ai-services/agents/whats-new.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: aahill
77
ms.author: aahi
88
ms.service: azure-ai-agent-service
99
ms.topic: overview
10-
ms.date: 01/30/2025
10+
ms.date: 04/23/2025
1111
ms.custom: azure-ai-agents
1212
---
1313

@@ -16,9 +16,19 @@ ms.custom: azure-ai-agents
1616
This article provides a summary of the latest releases and major documentation updates for Azure AI Agent Service.
1717

1818
## April 2025
19+
20+
### Azure monitor integration
21+
22+
You can now see metrics related to Agents in Azure monitor
23+
* The number of files indexed for file search.
24+
* The number of runs in a given timeframe.
25+
26+
See the [Azure monitor](./how-to/metrics.md) and [metrics reference](./reference/monitor-service.md) articles for more information.
27+
1928
### BYO thread storage
2029
The Standard Agent Setup now supports **Bring Your Own (BYO) thread storage using an Azure Cosmos DB for NoSQL account**. This feature ensures all thread messages and conversation history are stored in your own resources. See the [Quickstart](./quickstart.md) for more information on how to deploy a Standard agent project.
2130

31+
2232
## March 2025
2333

2434
### Microsoft Fabric tool

articles/ai-services/openai/how-to/responses.md

Lines changed: 21 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to use Azure OpenAI's new stateful Responses API.
55
manager: nitinme
66
ms.service: azure-ai-openai
77
ms.topic: include
8-
ms.date: 04/23/2025
8+
ms.date: 03/21/2025
99
author: mrbullwinkle
1010
ms.author: mbullwin
1111
ms.custom: references_regions
@@ -56,9 +56,9 @@ Not every model is available in the regions supported by the responses API. Chec
5656
> - Structured outputs
5757
> - tool_choice
5858
> - image_url pointing to an internet address
59-
> - The web search tool is also not supported, and isn't part of the `2025-03-01-preview` API.
59+
> - The web search tool is also not supported, and is not part of the `2025-03-01-preview` API.
6060
>
61-
> There's also a known issue with vision performance when using the Responses API, particularly with OCR tasks. As a temporary workaround set image detail to `high`. This article will be updated once this issue is resolved and as any additional feature support is added.
61+
> There is also a known issue with vision performance when using the Responses API, particularly with OCR tasks. As a temporary workaround set image detail to `high`. This article will be updated once this issue is resolved and as any additional feature support is added.
6262
6363

6464
### Reference documentation
@@ -96,16 +96,6 @@ response = client.responses.create(
9696
input="This is a test."
9797
#truncation="auto" required when using computer-use-preview model.
9898

99-
response_id = response.id
100-
response_status = response.status
101-
102-
103-
print(f"\n Response ID: {response_id}")
104-
print(f"\n Response Status: {response_status}\n")
105-
106-
print(response.model_dump_json(indent=2))
107-
108-
10999
)
110100
```
111101

@@ -128,15 +118,6 @@ response = client.responses.create(
128118
input="This is a test."
129119
#truncation="auto" required when using computer-use-preview model.
130120

131-
response_id = response.id
132-
response_status = response.status
133-
134-
135-
print(f"\n Response ID: {response_id}")
136-
print(f"\n Response Status: {response_status}\n")
137-
138-
print(response.model_dump_json(indent=2))
139-
140121
)
141122
```
142123

@@ -171,111 +152,57 @@ curl -X POST https://YOUR-RESOURCE-NAME.openai.azure.com/openai/responses?api-ve
171152
**Output:**
172153

173154
```json
174-
Response ID: resp_680915b58140819085f4c55454402f3600400b1e6ec996fc
175-
176-
Response Status: completed
177-
178155
{
179-
"id": "resp_680915b58140819085f4c55454402f3600400b1e6ec996fc",
180-
"created_at": 1745425845.0,
156+
"id": "resp_67cb32528d6881909eb2859a55e18a85",
157+
"created_at": 1741369938.0,
181158
"error": null,
182159
"incomplete_details": null,
183160
"instructions": null,
184161
"metadata": {},
185-
"model": "gpt-4o",
162+
"model": "gpt-4o-2024-08-06",
186163
"object": "response",
187164
"output": [
188165
{
189-
"id": "msg_680915b5c8dc8190b21a72a55830fea900400b1e6ec996fc",
166+
"id": "msg_67cb3252cfac8190865744873aada798",
190167
"content": [
191168
{
192169
"annotations": [],
193-
"text": "It looks like you're testing out how this works! How can I assist you today?",
170+
"text": "Great! How can I help you today?",
194171
"type": "output_text"
195172
}
196173
],
197174
"role": "assistant",
198-
"status": "completed",
175+
"status": null,
199176
"type": "message"
200177
}
201178
],
202-
"parallel_tool_calls": true,
179+
"output_text": "Great! How can I help you today?",
180+
"parallel_tool_calls": null,
203181
"temperature": 1.0,
204-
"tool_choice": "auto",
182+
"tool_choice": null,
205183
"tools": [],
206184
"top_p": 1.0,
207185
"max_output_tokens": null,
208186
"previous_response_id": null,
209-
"reasoning": {
210-
"effort": null,
211-
"generate_summary": null,
212-
"summary": null
213-
},
214-
"service_tier": null,
187+
"reasoning": null,
215188
"status": "completed",
216-
"text": {
217-
"format": {
218-
"type": "text"
219-
}
220-
},
221-
"truncation": "disabled",
189+
"text": null,
190+
"truncation": null,
222191
"usage": {
223-
"input_tokens": 12,
224-
"input_tokens_details": {
225-
"cached_tokens": 0
226-
},
227-
"output_tokens": 18,
192+
"input_tokens": 20,
193+
"output_tokens": 11,
228194
"output_tokens_details": {
229195
"reasoning_tokens": 0
230196
},
231-
"total_tokens": 30
197+
"total_tokens": 31
232198
},
233199
"user": null,
234-
"store": true
200+
"reasoning_effort": null
235201
}
236202
```
237203

238204
---
239205

240-
Unlike the chat completions API, the responses API is asynchronous. More complex requests may not be completed by the time that an initial response is returned by the API. This is similar to how the Assistants API handles [thread/run status](/azure/ai-services/openai/how-to/assistant#retrieve-thread-status).
241-
242-
Note in the response output that the response object contains a `status` which can be monitored to determine when the response is finally complete. `status` can contain a value of `completed`, `failed`, `in_progress`, or `incomplete`.
243-
244-
### Retrieve an individual response status
245-
246-
In the previous Python examples we created a variable `response_id` and set it equal to the `response.id` of our `client.response.create()` call. We can then pass client.response.retrieve() to pull the current status of our response.
247-
248-
```python
249-
250-
retrieve_response = client.responses.retrieve(response_id)
251-
print(retrieve_response.status)
252-
```
253-
254-
### Monitor response status
255-
256-
Depending on the complexity of your request it isn't uncommon to have an initial response with a status of `in_progress` with message output not yet generated. In that case you can create a loop to monitor the status of the response with code. The example below is for demonstration purposes only and is intended to be run in a Jupyter notebook. This code assumes you have already run the two previous Python examples and the Azure OpenAI client as well as `retrieve_response` have already been defined:
257-
258-
```python
259-
import time
260-
from IPython.display import clear_output
261-
262-
start_time = time.time()
263-
264-
status = retrieve_response.status
265-
266-
while status not in ["completed", "failed", "incomplete"]:
267-
time.sleep(5)
268-
retrieve_response = client.responses.retrieve(response_id)
269-
print("Elapsed time: {} minutes {} seconds".format(int((time.time() - start_time) // 60), int((time.time() - start_time) % 60)))
270-
status = retrieve_response.status
271-
print(f'Status: {status}')
272-
clear_output(wait=True)
273-
274-
print(f'Status: {status}')
275-
print("Elapsed time: {} minutes {} seconds".format(int((time.time() - start_time) // 60), int((time.time() - start_time) % 60)))
276-
print(retrieve_response.model_dump_json(indent=2))
277-
```
278-
279206
## Retrieve a response
280207

281208
To retrieve a response from a previous call to the responses API.
@@ -678,7 +605,7 @@ print(response.model_dump_json(indent=2))
678605

679606
## Image input
680607

681-
There's a known issue with image url based image input. Currently only base64 encoded images are supported.
608+
There is a known issue with image url based image input. Currently only base64 encoded images are supported.
682609

683610
### Image url
684611

@@ -958,7 +885,7 @@ async def take_screenshot(page):
958885
return last_successful_screenshot
959886
```
960887

961-
This function captures the current browser state as an image and returns it as a base64-encoded string, ready to be sent to the model. We'll constantly do this in a loop after each step allowing the model to see if the command it tried to execute was successful or not, which then allows it to adjust based on the contents of the screenshot. We could let the model decide if it needs to take a screenshot, but for simplicity we'll force a screenshot to be taken for each iteration.
888+
This function captures the current browser state as an image and returns it as a base64-encoded string, ready to be sent to the model. We'll constantly do this in a loop after each step allowing the model to see if the command it tried to execute was successful or not, which then allows it to adjust based on the contents of the screenshot. We could let the model decide if it needs to take a screenshot, but for simplicity we will force a screenshot to be taken for each iteration.
962889

963890
### Model response processing
964891

0 commit comments

Comments
 (0)