AgentInsightMonitorsOperations Class
Custom operations for Agent Insights monitors.
Constructor
AgentInsightMonitorsOperations(*args, **kwargs)
Methods
| begin_create_run |
Start an Agent Insights run for a monitor. |
| cancel_run |
Cancel an Agent Insights run. |
| create |
Create an Agent Insights monitor for an agent. |
| delete |
Delete an Agent Insights monitor and all of its runs, insights, and state. |
| get |
Get an Agent Insights monitor. |
| get_insight |
Get a full insight for an Agent Insights monitor. |
| get_run |
Get an Agent Insights run. |
| list |
List Agent Insights monitors, optionally filtered by agent name. |
| list_insights |
List current insights for a monitor. Filter types combine with AND; values within each list combine with OR. |
| list_runs |
List Agent Insights runs for a monitor. |
| reset |
Reset an Agent Insights monitor's generated summary, checkpoint, and active insight state. |
| update |
Update an Agent Insights monitor. |
| update_insight |
Update the lifecycle status of an insight. |
begin_create_run
Start an Agent Insights run for a monitor.
begin_create_run(monitor_id: str, *, operation_id: str | None = None, content_type: str = 'application/json', lookback_hours: float | None = None, **kwargs: Any) -> AgentInsightRunLROPoller
Parameters
| Name | Description |
|---|---|
|
monitor_id
Required
|
The identifier of the monitor. Required. |
|
body
|
Run inputs as JSON or IO[bytes]. Omit to use |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
operation_id
|
Client-generated unique ID for idempotent retries. When absent, the server creates the run unconditionally. Default value is None. Default value: None
|
|
lookback_hours
|
Hours of trace history to analyze, up to 2,160. Defaults to 168. Default value: None
|
Returns
| Type | Description |
|---|---|
|
A poller that returns AgentInsightRunResult and exposes the run ID in |
Exceptions
| Type | Description |
|---|---|
cancel_run
Cancel an Agent Insights run.
cancel_run(monitor_id: str, run_id: str, **kwargs: Any) -> AgentInsightRun
Parameters
| Name | Description |
|---|---|
|
monitor_id
Required
|
The identifier of the monitor. Required. |
|
run_id
Required
|
The identifier of the run. Required. |
Returns
| Type | Description |
|---|---|
|
AgentInsightRun. The AgentInsightRun is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
create
Create an Agent Insights monitor for an agent.
create(body: ~collections.abc.MutableMapping[str, ~typing.Any] | ~typing.IO[bytes] = <object object>, *, agent_name: str = <object object>, model_deployment_name: str = <object object>, enabled: bool | None = None, run_interval_hours: float | None = None, priorities: ~azure.ai.projects.models._models.AgentInsightPriorities | None = None, **kwargs: ~typing.Any) -> AgentInsightMonitor
Parameters
| Name | Description |
|---|---|
|
body
|
Is either a JSON type or a IO[bytes] type. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
agent_name
|
The agent this monitor should analyze. Required. Default value: <object object at 0x0000029F297D0430>
|
|
model_deployment_name
|
The model deployment to use for analyzing traces. Accepts either the deployment name alone or with the connection name as '{connectionName}/modelDeploymentName'. Required. Default value: <object object at 0x0000029F297D0430>
|
|
enabled
|
Whether scheduled insight generation should be armed. Defaults to false. Default value is None. Default value: None
|
|
run_interval_hours
|
Interval between scheduled insight runs, in hours. Defaults to 6. Default value is None. Default value: None
|
|
priorities
|
Analysis priorities for the monitor. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
AgentInsightMonitor. The AgentInsightMonitor is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
delete
Delete an Agent Insights monitor and all of its runs, insights, and state.
delete(monitor_id: str, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
monitor_id
Required
|
The identifier of the monitor. Required. |
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
get
Get an Agent Insights monitor.
get(monitor_id: str, **kwargs: Any) -> AgentInsightMonitor
Parameters
| Name | Description |
|---|---|
|
monitor_id
Required
|
The identifier of the monitor. Required. |
Returns
| Type | Description |
|---|---|
|
AgentInsightMonitor. The AgentInsightMonitor is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
get_insight
Get a full insight for an Agent Insights monitor.
get_insight(monitor_id: str, insight_id: str, *, include_details: bool | None = None, **kwargs: Any) -> AgentInsight
Parameters
| Name | Description |
|---|---|
|
monitor_id
Required
|
The identifier of the monitor. Required. |
|
insight_id
Required
|
The identifier of the insight. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
include_details
|
Whether to include expanded insight details such as evidence and run links in the response. Defaults to false. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
AgentInsight. The AgentInsight is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
get_run
Get an Agent Insights run.
get_run(monitor_id: str, run_id: str, **kwargs: Any) -> AgentInsightRun
Parameters
| Name | Description |
|---|---|
|
monitor_id
Required
|
The identifier of the monitor. Required. |
|
run_id
Required
|
The identifier of the run. Required. |
Returns
| Type | Description |
|---|---|
|
AgentInsightRun. The AgentInsightRun is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
list
List Agent Insights monitors, optionally filtered by agent name.
list(*, before: str | None = None, limit: int | None = None, order: str | PageOrder | None = None, agent_name: str | None = None, **kwargs: Any) -> ItemPaged[AgentInsightMonitorListItem]
Keyword-Only Parameters
| Name | Description |
|---|---|
|
before
|
A cursor that identifies the first item in the next page. Default value is None. Default value: None
|
|
limit
|
The maximum number of items to return. Defaults to 20. Default value is None. Default value: None
|
|
order
|
Sort order by creation time. Defaults to descending. Known values are: "asc" and "desc". Default value is None. Default value: None
|
|
agent_name
|
Filter monitors by agent name. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of AgentInsightMonitorListItem |
Exceptions
| Type | Description |
|---|---|
list_insights
List current insights for a monitor. Filter types combine with AND; values within each list combine with OR.
list_insights(monitor_id: str, *, before: str | None = None, limit: int | None = None, order: str | PageOrder | None = None, categories: list[str] | None = None, severities: list[Union[str, azure.ai.projects.models._enums.AgentInsightSeverity]] | None = None, statuses: list[Union[str, azure.ai.projects.models._enums.AgentInsightStatus]] | None = None, include_details: bool | None = None, **kwargs: Any) -> ItemPaged[AgentInsight]
Parameters
| Name | Description |
|---|---|
|
monitor_id
Required
|
The identifier of the monitor. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
before
|
A cursor that identifies the first item in the next page. Default value is None. Default value: None
|
|
limit
|
The maximum number of items to return. Defaults to 20. Default value is None. Default value: None
|
|
order
|
Sort order by creation time. Defaults to descending. Known values are: "asc" and "desc". Default value is None. Default value: None
|
|
categories
|
Match any listed category. Commas separate identifiers; identifiers containing commas cannot be filtered individually. Default value is None. Default value: None
|
|
severities
|
Match any listed severity. Default value is None. Default value: None
|
|
statuses
|
Match any listed status. Default value is None. Default value: None
|
|
include_details
|
Whether to include expanded insight details such as evidence and run links in the response. Defaults to false. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of AgentInsight |
Exceptions
| Type | Description |
|---|---|
list_runs
List Agent Insights runs for a monitor.
list_runs(monitor_id: str, *, before: str | None = None, limit: int | None = None, order: str | PageOrder | None = None, status: str | JobStatus | None = None, trigger: str | AgentInsightRunTrigger | None = None, **kwargs: Any) -> ItemPaged[AgentInsightRun]
Parameters
| Name | Description |
|---|---|
|
monitor_id
Required
|
The identifier of the monitor. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
before
|
A cursor that identifies the first item in the next page. Default value is None. Default value: None
|
|
limit
|
The maximum number of items to return. Defaults to 20. Default value is None. Default value: None
|
|
order
|
Sort order by creation time. Defaults to descending. Known values are: "asc" and "desc". Default value is None. Default value: None
|
|
status
|
Filter runs by status. Known values are: "queued", "in_progress", "succeeded", "failed", "cancelled", and "skipped". Default value is None. Default value: None
|
|
trigger
|
Filter runs by trigger. Known values are: "on_demand" and "scheduled". Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of AgentInsightRun |
Exceptions
| Type | Description |
|---|---|
reset
Reset an Agent Insights monitor's generated summary, checkpoint, and active insight state.
reset(monitor_id: str, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
monitor_id
Required
|
The identifier of the monitor. Required. |
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
update
Update an Agent Insights monitor.
update(monitor_id: str, body: ~collections.abc.MutableMapping[str, ~typing.Any] | ~typing.IO[bytes] = <object object>, *, enabled: bool | None = None, run_interval_hours: float | None = None, model_deployment_name: str | None = None, priorities: ~azure.ai.projects.models._models.AgentInsightPriorities | None = None, **kwargs: ~typing.Any) -> AgentInsightMonitor
Parameters
| Name | Description |
|---|---|
|
monitor_id
Required
|
The identifier of the monitor. Required. |
|
body
|
Is either a JSON type or a IO[bytes] type. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
enabled
|
Whether scheduled insight generation is armed for the monitor. Default value is None. Default value: None
|
|
run_interval_hours
|
Interval between scheduled insight runs, in hours. Default value is None. Default value: None
|
|
model_deployment_name
|
The model deployment to use for analyzing traces. Accepts either the deployment name alone or with the connection name as '{connectionName}/modelDeploymentName'. Default value is None. Default value: None
|
|
priorities
|
Replaces all priorities. Omit to preserve them; null clears them. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
AgentInsightMonitor. The AgentInsightMonitor is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
update_insight
Update the lifecycle status of an insight.
update_insight(monitor_id: str, insight_id: str, body: ~collections.abc.MutableMapping[str, ~typing.Any] | ~typing.IO[bytes] = <object object>, *, status: str | ~azure.ai.projects.models._enums.AgentInsightStatus | None = None, **kwargs: ~typing.Any) -> AgentInsight
Parameters
| Name | Description |
|---|---|
|
monitor_id
Required
|
The identifier of the monitor. Required. |
|
insight_id
Required
|
The identifier of the insight. Required. |
|
body
|
Is either a JSON type or a IO[bytes] type. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
status
|
The lifecycle status to apply to the insight. Known values are: "active", "resolved", and "ignored". Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
AgentInsight. The AgentInsight is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|