Agent Insight Monitors
createRun
Start an Agent Insights run for a monitor.
Header parameters
Foundry-Features
enum
required
A feature flag opt-in required when using preview operations or modifying persisted preview resources.
Operation-Id
string
Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally.
Path parameters
monitor_id
string
required
The identifier of the monitor.
Query parameters
api-version
string
required
The API version to use for this operation.
Request Body
Run inputs. Send an empty object to use the default 168-hour lookback window.
lookback_hours
number
Optional finite positive number of hours of trace history to analyze, up to 2,160. Defaults to 168.
Responses
The request has succeeded and a new resource has been created as a result.
Headers
Operation-Location
string
required
URL to poll for the job status.
Location
string
required
URL of the created job resource.
Body
id
string
required
Server-assigned unique identifier.
inputs
AgentInsightRunCreate
Inputs used when creating an agent insight run.
lookback_hours
number
Optional finite positive number of hours of trace history to analyze, up to 2,160. Defaults to 168.
result
AgentInsightRunResult
Result statistics produced when an agent insight run succeeds.
traces_in_window
integer
required
The number of traces in the analyzed time window.
traces_analyzed
integer
required
The number of traces analyzed by the run.
insights_created
integer
required
The number of insights created by the run.
insights_updated
integer
required
The number of insights updated by the run.
insights_reopened
integer
required
The number of insights reopened by the run.
token_usage
AgentInsightTokenUsage
required
Token usage for an Agent Insights run.
input_tokens
integer
required
The number of input tokens used by the run.
output_tokens
integer
required
The number of output tokens used by the run.
cached_tokens
integer
The number of input tokens served from cache.
total_tokens
integer
required
The total number of tokens used by the run.
status
string | enum
required
Extensible status values shared by Foundry jobs.
enum
error
OpenAI.Error
misalignment
OpenAI.MisalignmentErrorDetailsResource
error_type
string | enum
enum
detailed_explanation
string
The public explanation for this block.
steer
OpenAI._MisalignmentSteer
message
string
required
The public continuation instruction.
monitor_id
string
required
The Agent Insights monitor this run belongs to.
agent_name
string
required
The agent whose traces are analyzed by this run.
trigger
string | enum
required
The trigger that started an agent insight run.
enum
model_deployment_name
string
required
The model deployment used to analyze traces for this run.
Request
POST /agent_insight_monitors/{monitor_id}/runs HTTP/1.1
Response
Status: 201
Content-Type: application/json
Status: 4XX
Content-Type: application/json
Status: 5XX
Content-Type: application/json