Related queries and mutations in Agent traces and evaluations. Each has its own section.
Queries
evaluateAgentMonitorDataSource (query)
evaluateAgentMonitorDataSource is a query in the Monte Carlo GraphQL API, in Agent traces and evaluations. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Get agent span/trace schema from base trace table
Arguments
| Argument | Type | Description |
|---|---|---|
mcon | String! | MCON to evaluate |
connectionId | UUID | Connection UUID |
transforms | [TransformInput!] | Transforms to apply to the data source |
filters | FilterGroupInput | Structured SQL filtering conditions to apply to query |
agentSpanFilters | [AgentSpanFilterInput!] | Filter by agent span fields (agent, workflow, task, span_name) |
isAgentTraceAggregation | Boolean | If true, evaluate schema for trace-level aggregation mode |
isAgentConversationAggregation | Boolean | If true, evaluate schema for conversation-level aggregation mode (accepts conversation-grain eval templates). |
clusteringSpaceUuid | UUID | Conversation clustering space whose membership filters or segments the evaluated data source, mirroring the monitor's cluster reference. Requires isAgentConversationAggregation. |
clusterKeys | [String!] | Clusters to filter to (any-of) within clusteringSpaceUuid. Omit when segmenting by cluster_key via segments. |
segments | [FilterValueUnionInput!] | Segment fields matching the monitor's segments input. Including 'cluster_key' together with clusteringSpaceUuid evaluates the segmented shape, exposing a cluster_key column on the returned schema. |
Returns
Example
query EvaluateAgentMonitorDataSource($mcon: String!) {
evaluateAgentMonitorDataSource(mcon: $mcon) {
connectionUuid
warehouseUuid
mcons
rowCount
unresolvedMcons
whereCondition
}
}Related types
AgentSpanFilterInput, DataSourceEvaluationResult, FilterGroupInput, FilterValueUnionInput, TransformInput, UUID
getAgentConversationSampleV2 (query)
getAgentConversationSampleV2 is a query in the Monte Carlo GraphQL API, in Agent traces and evaluations. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Sample conversation-grain agent data: one row per conversation (packed transcript + conversation-level columns). When conversation eval transforms are supplied, each conversation is scored by them; when omitted, the raw conversation rows are returned without scoring.
Arguments
| Argument | Type | Description |
|---|---|---|
mcon | String! | MCON of the table with agent observability traces |
agentSpanFilters | [AgentSpanFilterInput!]! | Filter by agent span fields. Conversation eval monitors require exactly one agent filter (agent, optionally scoped to a workflow). |
filters | FilterGroupInput | Conversation-level filtering conditions (turn_count, duration_seconds, status). |
transforms | [TransformInput!] | Conversation eval transforms used to score each sampled conversation. Omit to fetch the raw conversation rows without any LLM scoring. |
limit | Int | Number of sample conversations to return (1–100) Default: 10. |
offset | Int | Number of conversations to skip before returning results (min 0) Default: 0. |
connectionId | UUID | Connection UUID |
ingestionStartTime | DateTime | Filter by conversation turn start time (inclusive) |
ingestionEndTime | DateTime | Exclusive upper bound on conversation turn time |
collectionLagHours | Int | Optional completeness settle, in hours: conversations whose last turn is newer than this are held back as still in progress. Opt-in — defaults to 0 (no settle) so the preview surfaces the newest conversations; set it to mirror a saved monitor's collection_lag. Applies only when no explicit time range is given; an explicit range is treated as authoritative. Default: 0. |
includeToolCalls | Boolean | When true, the sample also returns a conversationWithToolCalls column: the transcript with tool call inputs, outputs, and errors interleaved between the turns that triggered them. Also implied when any supplied transform reads tool calls: its includeToolCalls is true, or it is unset and its template reads tool calls by default (as groundedness_conversation does). False or omitted otherwise returns the plain transcript. Default: false. |
clusteringSpaceUuid | UUID | Conversation clustering space whose membership filters or segments the sample, mirroring the monitor's cluster reference. Membership is resolved best-effort — a sample taken during classification lag can differ from the eventual datapoint. |
clusterKeys | [String!] | Clusters to filter the sample to (any-of) within clusteringSpaceUuid. Omit when segmenting by cluster_key via segments. |
segments | [FilterValueUnionInput!] | Segment fields matching the monitor's segments input. Including 'cluster_key' together with clusteringSpaceUuid previews the segmented shape: one row per (conversation, cluster) with a cluster_key column. |
Returns
Example
query GetAgentConversationSampleV2($mcon: String!, $agentSpanFilters: [AgentSpanFilterInput!]!) {
getAgentConversationSampleV2(mcon: $mcon, agentSpanFilters: $agentSpanFilters) {
columns
rows
hasCustomSqlFilter
query
hasError
error
samplingDisabled
samplingRestricted
contentWithheldReason
rateLimitExceeded
idempotentStatus
downloadUrl
queryExecutionId
}
}Related types
AgentSpanFilterInput, DateTime, FilterGroupInput, FilterValueUnionInput, SQLResponse, TransformInput, UUID
getAgentEvaluationRunSamples (query)
getAgentEvaluationRunSamples is a query in the Monte Carlo GraphQL API, in Agent traces and evaluations. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Fetch exact stored evaluated rows for an AgentEvaluation monitor run.
Arguments
| Argument | Type | Description |
|---|---|---|
input | AgentEvaluationRunSamplesInput! |
Returns
AgentEvaluationRunSamplesResult
Example
query GetAgentEvaluationRunSamples($input: AgentEvaluationRunSamplesInput!) {
getAgentEvaluationRunSamples(input: $input) {
status
message
unsupportedReason
totalCount
hasMore
contentWithheldReason
}
}Types used only by getAgentEvaluationRunSamples
getAgentEvaluationRunSamplesAgentEvaluationRunSampleRow
AgentEvaluationRunSampleRowObject type.
| Field | Type | Description |
|---|---|---|
score | Float | Stored evaluation score for the requested metric |
metricName | String | Evaluation score field name |
conversationId | String | Conversation identifier, when available |
traceId | String | Trace identifier, when available |
spanId | String | Span identifier, when available |
explanation | String | Stored judge reasoning; null when unavailable. |
inputPreview | String | Input/prompt preview, when available |
outputPreview | String | Output/completion preview, when available |
promptPreview | String | Prompt preview, when available |
evaluatedAt | DateTime | Evaluation/run timestamp when available |
startedAt | DateTime | When the evaluated trace (span evaluations) or conversation (conversation evaluations) started; null when unknown |
AgentEvaluationRunSamplesInput
AgentEvaluationRunSamplesInputInput object type.
| Field | Type | Description |
|---|---|---|
monitorUuid | UUID! | Agent evaluation monitor UUID |
jobExecutionUuid | UUID! | Monitor run UUID from the metric datapoint that produced this run. Metric datapoints may carry a consolidating job UUID; direct job execution UUIDs are also accepted. |
metricName | String | Evaluation score field to fetch, usually the chart datapoint field/metric name. Required when the run contains multiple evaluation score fields. |
limit | Int | Number of rows to return (max 100) Default: 10. |
offset | Int | Number of stored evaluation rows to skip Default: 0. |
includeExplanation | Boolean | Include the stored judge explanation when available; explanation is null when unavailable. Default: true. |
sortDirection | AgentEvaluationSampleSortDirection | Score sort direction. Defaults to ASC (lowest scores first, worst-first for 1-5 quality evals). Pass DESC to return the highest-scoring rows first — the breaching side for boolean evaluations that alert on a count or rate of true. Default: "ASC". |
AgentEvaluationRunSamplesResult
AgentEvaluationRunSamplesResultObject type.
| Field | Type | Description |
|---|---|---|
status | AgentEvaluationRunSamplesStatus! | |
message | String | Human-readable unsupported/unavailable reason |
unsupportedReason | AgentEvaluationRunSamplesUnsupportedReason | Structured reason when status is UNSUPPORTED; null for supported or temporarily unavailable samples. |
rows | [AgentEvaluationRunSampleRow!]! | Exact stored evaluated rows for this monitor run |
totalCount | Int | Total row count when cheaply available |
hasMore | Boolean! | Whether another page is available |
contentWithheldReason | RawContentWithheldReason | Why the judge's explanation was withheld, or null when it was not. Rows still carry scores and timestamps either way, so an absent explanation alone cannot say whether none was stored or the caller may not read it. Only NO_CONTENT_PERMISSION is fixed by a role grant. |
AgentEvaluationRunSamplesStatus
AgentEvaluationRunSamplesStatusEnum type.
| Value | Description |
|---|---|
OK | |
UNSUPPORTED | |
UNAVAILABLE |
AgentEvaluationRunSamplesUnsupportedReason
AgentEvaluationRunSamplesUnsupportedReasonEnum type. Classify why exact samples cannot be produced for a run.
| Value | Description |
|---|---|
NON_AGENT_EVALUATION_MONITOR | |
TRACE_AGGREGATION | |
NON_CLICKHOUSE_SPAN_EVALUATION | |
UNSUPPORTED_SCORE_OUTPUT_TYPE |
AgentEvaluationSampleSortDirection
AgentEvaluationSampleSortDirectionEnum type. Score sort direction for evaluation run samples.
| Value | Description |
|---|---|
ASC | |
DESC |
Related types
DateTime, RawContentWithheldReason, UUID
getAgentSpanGroups (query)
getAgentSpanGroups is a query in the Monte Carlo GraphQL API, in Agent traces and evaluations. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Retrieve agent log groups with observability data
Arguments
| Argument | Type | Description |
|---|---|---|
mcon | String! | MCON of the table with agent observability traces |
traceMode | Boolean | Require traceIds to be supplied, rejecting the request when it is not. It has no other effect: it does not change which spans are returned, or the order they come back in. Default: false. |
traceIds | [String!] | Filter by specific trace IDs |
traceTimestamp | DateTime | Filter by trace timestamp (inclusive) +- 1 hr |
startTime | DateTime | Filter by span start time (inclusive) |
endTime | DateTime | Filter by span end time (inclusive) |
Returns
AgentSpanTree
Example
query GetAgentSpanGroups($mcon: String!) {
getAgentSpanGroups(mcon: $mcon) {
nodes {
nodeName
nodeValue
level
count
isLeaf
isToolCall
containerSpanName
multiParent
}
}
}Types used only by getAgentSpanGroups
getAgentSpanGroupsAgentSpanNode
AgentSpanNodeObject type.
| Field | Type | Description |
|---|---|---|
nodeName | String! | |
nodeValue | String | |
childNodes | [AgentSpanNode!]! | |
level | Int! | |
count | Int! | |
isLeaf | Boolean! | |
isToolCall | Boolean! | |
containerSpanName | String | |
multiParent | Boolean! |
AgentSpanTree
AgentSpanTreeObject type.
| Field | Type | Description |
|---|---|---|
nodes | [AgentSpanNode!]! |
Related types
getAgentSpanSample (query)
getAgentSpanSample is a query in the Monte Carlo GraphQL API, in Agent traces and evaluations. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Sample agent span data with optional transforms and filtering
Arguments
| Argument | Type | Description |
|---|---|---|
mcon | String! | MCON of the table with agent observability traces |
agentSpanFilters | [AgentSpanFilterInput!] | Filter by agent span fields (agent, workflow, task, span_name) |
filters | FilterGroupInput | Structured SQL filtering conditions to apply to query |
transforms | [TransformInput!] | Transforms to apply to the data source |
evaluationMode | Boolean | Return evaluation test columns only (prompts, completions, span_id, transform outputs) Default: false. |
traceMode | Boolean | Require traceIds to be supplied, rejecting the request when it is not. It has no other effect: it does not change which spans are returned, or the order they come back in. Default: false. |
limit | Int | Number of sample rows to return (1–100) Default: 10. |
offset | Int | Number of rows to skip before returning results (min 0) Default: 0. |
spanIds | [String!] | Filter by specific span IDs (<= limit) |
traceIds | [String!] | Filter by specific trace IDs (<= limit) |
connectionId | UUID | Connection UUID |
traceTimestamp | DateTime | Filter by trace timestamp (inclusive) +- 1 hr |
Returns
Example
query GetAgentSpanSample($mcon: String!) {
getAgentSpanSample(mcon: $mcon) {
columns
rows
hasCustomSqlFilter
query
hasError
error
samplingDisabled
samplingRestricted
contentWithheldReason
rateLimitExceeded
idempotentStatus
downloadUrl
queryExecutionId
}
}Related types
AgentSpanFilterInput, DateTime, FilterGroupInput, SQLResponse, TransformInput, UUID
getAgentSpanSampleV2 (query)
getAgentSpanSampleV2 is a query in the Monte Carlo GraphQL API, in Agent traces and evaluations. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Sample agent span data with optional transforms and filtering
Arguments
| Argument | Type | Description |
|---|---|---|
mcon | String! | MCON of the table with agent observability traces |
agentSpanFilters | [AgentSpanFilterInput!] | Filter by agent span fields (agent, workflow, task, span_name) |
attributeFilters | [SpanAttributeFilterInput!] | Filter spans by attribute key-value pairs from attr_map column |
filters | FilterGroupInput | Structured SQL filtering conditions to apply to query |
transforms | [TransformInput!] | Transforms to apply to the data source |
limit | Int | Number of sample rows to return (1–100) Default: 10. |
offset | Int | Number of rows to skip before returning results (min 0) Default: 0. |
spanIds | [String!] | Filter by specific span IDs (<= limit) |
traceIds | [String!] | Filter by specific trace IDs (<= limit) |
connectionId | UUID | Connection UUID |
traceTimestamp | DateTime | Filter by trace timestamp (inclusive) +- 1 hr |
ingestionStartTime | DateTime | Filter by span start time (inclusive) |
ingestionEndTime | DateTime | Filter by span end time |
selectExpressionType | AgentMonitorSelectExpressionType | This is to explicitly specify the type of select expressions. But we will return the columns based on the validity of the query.Not providing the select_expression_type will default to SPAN_TREE. Default: "SPAN_TREE". |
Returns
Example
query GetAgentSpanSampleV2($mcon: String!) {
getAgentSpanSampleV2(mcon: $mcon) {
columns
rows
hasCustomSqlFilter
query
hasError
error
samplingDisabled
samplingRestricted
contentWithheldReason
rateLimitExceeded
idempotentStatus
downloadUrl
queryExecutionId
}
}Types used only by getAgentSpanSampleV2
getAgentSpanSampleV2AgentMonitorSelectExpressionType
AgentMonitorSelectExpressionTypeEnum type.
| Value | Description |
|---|---|
ALL | |
ATTR_MAP_KEYS | |
COUNT | |
EVALUATION | |
SPAN_TREE | |
SPAN_VIEW | |
SPAN_EXPORT_VIEW | |
TRACE_IDS |
SpanAttributeFilterInput
SpanAttributeFilterInputInput object type.
| Field | Type | Description |
|---|---|---|
key | String! | |
value | String! |
Related types
AgentSpanFilterInput, DateTime, FilterGroupInput, SQLResponse, TransformInput, UUID
getTraceTreeNodes (query)
getTraceTreeNodes is a query in the Monte Carlo GraphQL API, in Agent traces and evaluations. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Retrieve span tree for a given traceId
Arguments
| Argument | Type | Description |
|---|---|---|
mcon | String! | MCON of the table with agent observability traces |
traceId | String! | Trace ID to retrieve |
traceStartTime | DateTime | Start time of the trace (inclusive). When both bounds are omitted the server resolves them from the trace itself; providing exactly one bound scans a one-day window anchored to it. |
traceEndTime | DateTime | End time of the trace (inclusive). Same omitted/single-bound behavior as traceStartTime. |
agentName | String | Agent the trace belongs to. Lets a user who can access that agent, but not its whole trace table, read the trace. The request fails when the trace contains spans of an agent the user cannot access. |
Returns
[TraceNode!]
Example
query GetTraceTreeNodes($mcon: String!, $traceId: String!) {
getTraceTreeNodes(mcon: $mcon, traceId: $traceId) {
nodeName
spanId
traceId
nodeId
parentSpanId
duration
startTime
endTime
ingestTime
hasPrompts
hasCompletions
promptTokens
completionTokens
totalTokens
model
agentName
conversationId
workflow
task
childSpanIds
}
}Types used only by getTraceTreeNodes
getTraceTreeNodesTraceNode
TraceNodeObject type.
| Field | Type | Description |
|---|---|---|
nodeName | String! | |
spanId | String! | |
traceId | String! | |
nodeId | String! | |
parentSpanId | String | |
duration | Int! | |
startTime | DateTime | |
endTime | DateTime | |
ingestTime | DateTime | |
hasPrompts | Boolean! | |
hasCompletions | Boolean! | |
promptTokens | Int | |
completionTokens | Int | |
totalTokens | Int | |
model | String | |
agentName | String | |
conversationId | String | |
workflow | String | |
task | String | |
childSpanIds | [String!]! | |
childNodeIds | [String!]! | |
startExtraNs | Int | |
endExtraNs | Int | |
status | Int | |
isToolCall | Boolean | |
isLlmCall | Boolean | |
durationBasis | UnmeasuredDurationBasis | |
hasError | Boolean! |
UnmeasuredDurationBasis
UnmeasuredDurationBasisEnum type. Why a span's duration is not a measurement. null means measured.
| Value | Description |
|---|---|
INHERITED | |
APPORTIONED | |
UNKNOWN |
Related types
Mutations
createOrUpdateAgentEvaluationMonitor (mutation)
createOrUpdateAgentEvaluationMonitor is a mutation in the Monte Carlo GraphQL API, in Agent traces and evaluations. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Create or update an Agent Evaluation monitor
Arguments
| Argument | Type | Description |
|---|---|---|
agentSpanFilters | [AgentSpanFilterInput!]! | Filter by agent span fields (agent, workflow, task, span_name) |
aggregateBy | MonitorAggTimeInterval | Aggregation time interval. When not using a hourly interval, the timecomponent of the event timestamp should be ignored. Default: "HOUR". |
alertConditions | [MetricAlertConditionInput!]! | Alert conditions. |
alertGrouping | AlertGroupingInput | Per-monitor alert grouping configuration. Omit or pass null for legacy per-type grouping; a non-null value enables monitor-based alert grouping. The createOrUpdate* mutations are full-state: omitting this field on an update clears any existing configuration (same as samplingConfig). |
audienceConditions | [AudienceConditionInput!] | Narrows individual audiences to the triage priorities that reach them. Always a full replace: omitting the argument (or passing null) makes every audience unconditional, the same as passing an empty list; a non-empty list replaces the conditions wholesale. Every audience named here must also appear in this mutation's audience list (audiences, or labels on the mutations that spell it that way), which stays the monitor's full audience set — a condition narrows when one of them is notified, it does not add one. |
audiences | [String!] | The monitor notification audiences |
autoTriage | Boolean | Per-monitor automated-triage override. true forces triage on for this monitor, false forces it off, and null (or omitting the argument) clears the override so the monitor inherits the domain/account setting. Because omitting the argument clears the override, an update call that does not send this field will reset any previously set override, including a deliberate false, back to inherit. |
autoTuning | Boolean | Per-monitor auto-apply-tuning override. true forces auto-apply tuning on for this monitor, false forces it off, and null (or omitting the argument) clears the override so the monitor inherits the domain/account setting. Because omitting the argument clears the override, an update call that does not send this field will reset any previously set override, including a deliberate false, back to inherit. |
clusterKeys | [String!] | Clusters to filter to (any-of) within clusteringSpaceUuid. Omit when segmenting by cluster_key — a segmented monitor covers every cluster in the space. |
clusteringSpaceUuid | UUID | Conversation clustering space whose membership filters or segments the monitor. Requires isAgentConversationAggregation. Filter by naming clusters in clusterKeys, or segment by adding 'cluster_key' to segments. |
collectionLagHours | Int | Collection lag in hours (for the provided timestamp). When 0 or omitted, the account-level default collection lag applies (if one is configured). Default: 0. |
connectionId | UUID | Specify a connection (e.g. query-engine) to use |
dataQualityDimension | String | Data quality dimension. |
dataSource | DataSourceUnionInput! | |
description | String! | Used as the name in the UI |
domainUuids | [UUID!] | Please provide one and only one valid domain uuid. |
dryRun | Boolean | Dry run the monitor creation or update and return the MaC YAML and queries. Default: false. |
dwId | UUID! | Warehouse the monitor will be run on. |
failOnReset | Boolean | Return an error if the update is a significant change that would require a monitor reset. Default: false. |
failureAudiences | [String!] | The monitor notification audiences for failures |
filters | FilterGroupInput | Structured SQL filtering conditions to apply to query |
highSegmentCount | Boolean | Flag to apply additional limits which increase the supported segment count Default: false. |
isAgentConversationAggregation | Boolean | If true, the monitor operates at the conversation grain: evaluation monitors score whole conversations, and metric monitors compute conversation-level metrics (turn_count, duration_seconds, total_tokens, ...). Default (false) operates on individual spans. Default: false. |
isDraft | Boolean | Make target a draft monitor. Default: false. |
notes | String | Additional context for the monitor Default: "". |
priority | String | The default priority for alerts involving this monitor |
samplingConfig | MonitorSamplingConfigInput! | Sampling configuration: either percentage or fixed count |
scheduleConfig | ScheduleConfigInput! | Schedule of monitor |
segmentCountHint | Int | Segment count when then monitor was created. Can be returned as the segment count for the monitor when no successful execution has yet occurred, and a fresh segment count is not available. This allows the UI to properly validate the monitor configuration and avoid creating monitors that will fail when they are created due too many metric combinations. |
segments | [FilterValueUnionInput!] | Segments |
sensitivity | SensitivityLevels | Sensitivity for automated thresholds. |
skipReset | Boolean | Do not reset monitor if the update is a significant change that would normally cause the monitor to be reset. Learned model might not match the new monitor configuration and false positives might be detected for up to 35 days Default: false. |
tags | [TagKeyValuePairInput!] | The monitor tags. |
timeBucketed | Boolean | Whether to use time bucketing (True) or all rows (False). When False, aggregate_by is ignored and no time axis is used. Default: true. |
uuid | UUID | UUID of the monitor. If specified, it means the request is for update |
Returns
CreateOrUpdateAgentEvaluationMonitor
Example
mutation CreateOrUpdateAgentEvaluationMonitor($agentSpanFilters: [AgentSpanFilterInput!]!, $alertConditions: [MetricAlertConditionInput!]!, $dataSource: DataSourceUnionInput!, $description: String!, $dwId: UUID!, $samplingConfig: MonitorSamplingConfigInput!, $scheduleConfig: ScheduleConfigInput!) {
createOrUpdateAgentEvaluationMonitor(agentSpanFilters: $agentSpanFilters, alertConditions: $alertConditions, dataSource: $dataSource, description: $description, dwId: $dwId, samplingConfig: $samplingConfig, scheduleConfig: $scheduleConfig) {
queries
warnings
}
}Types used only by createOrUpdateAgentEvaluationMonitor
createOrUpdateAgentEvaluationMonitorCreateOrUpdateAgentEvaluationMonitor
CreateOrUpdateAgentEvaluationMonitorObject type. Create or update an Agent Evaluation monitor (with sampling_config and transforms).
| Field | Type | Description |
|---|---|---|
agentMonitor | MetricMonitoring | |
queries | [String!] | SQL queries that will be run by the monitor on each execution. |
warnings | [String!] | Warnings about the monitor's agent, such as an agent with no recent conversation rows. A warning does not stop the save. Dry runs return the same warnings. |
Related types
AgentSpanFilterInput, AlertGroupingInput, AudienceConditionInput, DataSourceUnionInput, FilterGroupInput, FilterValueUnionInput, MetricAlertConditionInput, MetricMonitoring, MonitorAggTimeInterval, MonitorSamplingConfigInput, ScheduleConfigInput, SensitivityLevels, TagKeyValuePairInput, UUID
createOrUpdateAgentMetricMonitor (mutation)
createOrUpdateAgentMetricMonitor is a mutation in the Monte Carlo GraphQL API, in Agent traces and evaluations. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Create or update an Agent Metric monitor
Arguments
| Argument | Type | Description |
|---|---|---|
agentSpanFilters | [AgentSpanFilterInput!]! | Filter by agent span fields (agent, workflow, task, span_name) |
aggregateBy | MonitorAggTimeInterval | Aggregation time interval. When not using a hourly interval, the timecomponent of the event timestamp should be ignored. Default: "HOUR". |
alertConditions | [MetricAlertConditionInput!]! | Alert conditions. |
alertGrouping | AlertGroupingInput | Per-monitor alert grouping configuration. Omit or pass null for legacy per-type grouping; a non-null value enables monitor-based alert grouping. The createOrUpdate* mutations are full-state: omitting this field on an update clears any existing configuration (same as samplingConfig). |
audienceConditions | [AudienceConditionInput!] | Narrows individual audiences to the triage priorities that reach them. Always a full replace: omitting the argument (or passing null) makes every audience unconditional, the same as passing an empty list; a non-empty list replaces the conditions wholesale. Every audience named here must also appear in this mutation's audience list (audiences, or labels on the mutations that spell it that way), which stays the monitor's full audience set — a condition narrows when one of them is notified, it does not add one. |
audiences | [String!] | The monitor notification audiences |
autoTriage | Boolean | Per-monitor automated-triage override. true forces triage on for this monitor, false forces it off, and null (or omitting the argument) clears the override so the monitor inherits the domain/account setting. Because omitting the argument clears the override, an update call that does not send this field will reset any previously set override, including a deliberate false, back to inherit. |
autoTuning | Boolean | Per-monitor auto-apply-tuning override. true forces auto-apply tuning on for this monitor, false forces it off, and null (or omitting the argument) clears the override so the monitor inherits the domain/account setting. Because omitting the argument clears the override, an update call that does not send this field will reset any previously set override, including a deliberate false, back to inherit. |
clusterKeys | [String!] | Clusters to filter to (any-of) within clusteringSpaceUuid. Omit when segmenting by cluster_key — a segmented monitor covers every cluster in the space. |
clusteringSpaceUuid | UUID | Conversation clustering space whose membership filters or segments the monitor. Requires isAgentConversationAggregation. Filter by naming clusters in clusterKeys, or segment by adding 'cluster_key' to segments. |
collectionLagHours | Int | Collection lag in hours (for the provided timestamp). When 0 or omitted, the account-level default collection lag applies (if one is configured). Default: 0. |
connectionId | UUID | Specify a connection (e.g. query-engine) to use |
dataQualityDimension | String | Data quality dimension. |
dataSource | DataSourceUnionInput! | |
description | String! | Used as the name in the UI |
domainUuids | [UUID!] | Please provide one and only one valid domain uuid. |
dryRun | Boolean | Dry run the monitor creation or update and return the MaC YAML and queries. Default: false. |
dwId | UUID! | Warehouse the monitor will be run on. |
failOnReset | Boolean | Return an error if the update is a significant change that would require a monitor reset. Default: false. |
failureAudiences | [String!] | The monitor notification audiences for failures |
filters | FilterGroupInput | Structured SQL filtering conditions to apply to query |
highSegmentCount | Boolean | Flag to apply additional limits which increase the supported segment count Default: false. |
isAgentConversationAggregation | Boolean | If true, the monitor operates at the conversation grain: evaluation monitors score whole conversations, and metric monitors compute conversation-level metrics (turn_count, duration_seconds, total_tokens, ...). Default (false) operates on individual spans. Default: false. |
isAgentTraceAggregation | Boolean | If true, aggregates spans by trace_id for trace-level metrics. Default (false) returns span-level data. Mutually exclusive with isAgentConversationAggregation. Default: false. |
isDraft | Boolean | Make target a draft monitor. Default: false. |
notes | String | Additional context for the monitor Default: "". |
priority | String | The default priority for alerts involving this monitor |
scheduleConfig | ScheduleConfigInput! | Schedule of monitor |
segmentCountHint | Int | Segment count when then monitor was created. Can be returned as the segment count for the monitor when no successful execution has yet occurred, and a fresh segment count is not available. This allows the UI to properly validate the monitor configuration and avoid creating monitors that will fail when they are created due too many metric combinations. |
segments | [FilterValueUnionInput!] | Segments |
sensitivity | SensitivityLevels | Sensitivity for automated thresholds. |
skipReset | Boolean | Do not reset monitor if the update is a significant change that would normally cause the monitor to be reset. Learned model might not match the new monitor configuration and false positives might be detected for up to 35 days Default: false. |
tags | [TagKeyValuePairInput!] | The monitor tags. |
timeBucketed | Boolean | Whether to use time bucketing (True) or all rows (False). When False, aggregate_by is ignored and no time axis is used. Default: true. |
uuid | UUID | UUID of the monitor. If specified, it means the request is for update |
Returns
CreateOrUpdateAgentMetricMonitor
Example
mutation CreateOrUpdateAgentMetricMonitor($agentSpanFilters: [AgentSpanFilterInput!]!, $alertConditions: [MetricAlertConditionInput!]!, $dataSource: DataSourceUnionInput!, $description: String!, $dwId: UUID!, $scheduleConfig: ScheduleConfigInput!) {
createOrUpdateAgentMetricMonitor(agentSpanFilters: $agentSpanFilters, alertConditions: $alertConditions, dataSource: $dataSource, description: $description, dwId: $dwId, scheduleConfig: $scheduleConfig) {
queries
warnings
}
}Types used only by createOrUpdateAgentMetricMonitor
createOrUpdateAgentMetricMonitorCreateOrUpdateAgentMetricMonitor
CreateOrUpdateAgentMetricMonitorObject type. Create or update an Agent Metric monitor (no sampling_config, no transforms)
| Field | Type | Description |
|---|---|---|
agentMonitor | MetricMonitoring | |
queries | [String!] | SQL queries that will be run by the monitor on each execution. |
warnings | [String!] | Warnings about the monitor's agent, such as an agent with no recent conversation rows. A warning does not stop the save. Dry runs return the same warnings. |
Related types
AgentSpanFilterInput, AlertGroupingInput, AudienceConditionInput, DataSourceUnionInput, FilterGroupInput, FilterValueUnionInput, MetricAlertConditionInput, MetricMonitoring, MonitorAggTimeInterval, ScheduleConfigInput, SensitivityLevels, TagKeyValuePairInput, UUID
createOrUpdateAgentTrajectory (mutation)
createOrUpdateAgentTrajectory is a mutation in the Monte Carlo GraphQL API, in Agent traces and evaluations. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Create or update agent trajectory.
Arguments
| Argument | Type | Description |
|---|---|---|
agentSpanAlertCondition | AgentSpanConditionInput! | Agent span alert condition for filtering agent spans |
agentSpanFilters | [AgentSpanFilterInput!] | Filter by agent span fields (agent, workflow, task, span_name) |
alertGrouping | AlertGroupingInput | Per-monitor alert grouping configuration. Omit or pass null for legacy per-type grouping; a non-null value enables monitor-based alert grouping. The createOrUpdate* mutations are full-state: omitting this field on an update clears any existing configuration (same as samplingConfig). |
audienceConditions | [AudienceConditionInput!] | Narrows individual audiences to the triage priorities that reach them. Always a full replace: omitting the argument (or passing null) makes every audience unconditional, the same as passing an empty list; a non-empty list replaces the conditions wholesale. Every audience named here must also appear in this mutation's audience list (audiences, or labels on the mutations that spell it that way), which stays the monitor's full audience set — a condition narrows when one of them is notified, it does not add one. |
autoTriage | Boolean | Per-monitor automated-triage override. true forces triage on for this monitor, false forces it off, and null (or omitting the argument) clears the override so the monitor inherits the domain/account setting. Because omitting the argument clears the override, an update call that does not send this field will reset any previously set override, including a deliberate false, back to inherit. |
autoTuning | Boolean | Per-monitor auto-apply-tuning override. true forces auto-apply tuning on for this monitor, false forces it off, and null (or omitting the argument) clears the override so the monitor inherits the domain/account setting. Because omitting the argument clears the override, an update call that does not send this field will reset any previously set override, including a deliberate false, back to inherit. |
connectionId | UUID | Specify a connection (e.g. query-engine) to use |
customRuleUuid | UUID | UUID of custom rule, to update existing rule |
dataQualityDimension | String | Data quality dimension on the custom rule. |
dataSource | DataSourceUnionInput! | |
description | String! | Description of rule |
domainUuids | [UUID!] | Please provide one and only one valid domain uuid. |
dryRun | Boolean | Dry run the monitor creation or update and return the MaC YAML and queries. Default: false. |
dwId | UUID! | Warehouse UUID |
eventRollupCount | Int | The number of events to roll up into a single incident |
eventRollupUntilChanged | Boolean | If true, roll up events until the value changes |
exceptionPrimaryKeyColumn | String | Specifies the column which contains the primary key for sampled data used in exception management. |
failureAudiences | [String!] | The audiences to notify on failure |
filters | FilterGroupInput | Structured SQL filtering conditions to apply to query |
intervalMinutes | Int | How often to run scheduled custom rule check (DEPRECATED, use schedule instead) |
isDraft | Boolean | Make target a draft monitor. Default: false. |
isTracking | Boolean | True tracks failures without alerts; false enables alerts. Omit or use null to keep an existing monitor's mode. New monitors alert by default. |
labels | [String] | The monitor labels |
notes | String | Additional context for the monitor Default: "". |
notifyRuleRunFailure | Boolean | DEPRECATED: Completely ignored. This field has no effect on anything. Use failure_audiences to determine who is notified when run failures occur. |
priority | String | The default priority for alerts involving this monitor |
scheduleConfig | ScheduleConfigInput! | Schedule of the agent trajectory monitor |
severity | String | DEPRECATED. Use priority instead. The default severity for incidents involving this monitor Default: "". |
startTime | DateTime | Start time of schedule (DEPRECATED, use schedule instead) |
tags | [TagKeyValuePairInput] | The monitor tags. |
timeFilter | TimeFilterInput! | Filter by time filter for trajectory evaluation |
timeout | Int | Timeout for the SQL query |
timezone | String | Timezone (DEPRECATED, use timezone in scheduleConfig instead |
trajectoryScope | TrajectoryScope | TRACE counts the conditions within each trace. CONVERSATION counts them over the spans that ran before each trigger span in the same conversation. Defaults to TRACE on create. On update, leaving this out keeps the stored scope. |
triggerSpan | FilterSpanInput | Span that triggers the check. Required for the CONVERSATION scope. On an update that ends up CONVERSATION, leaving this out keeps the stored trigger span. |
Returns
CreateOrUpdateAgentTrajectory
Example
mutation CreateOrUpdateAgentTrajectory($agentSpanAlertCondition: AgentSpanConditionInput!, $dataSource: DataSourceUnionInput!, $description: String!, $dwId: UUID!, $scheduleConfig: ScheduleConfigInput!, $timeFilter: TimeFilterInput!) {
createOrUpdateAgentTrajectory(agentSpanAlertCondition: $agentSpanAlertCondition, dataSource: $dataSource, description: $description, dwId: $dwId, scheduleConfig: $scheduleConfig, timeFilter: $timeFilter) {
yaml
queries
warnings
}
}Types used only by createOrUpdateAgentTrajectory
createOrUpdateAgentTrajectoryCreateOrUpdateAgentTrajectory
CreateOrUpdateAgentTrajectoryObject type. Create or update an agent trajectory monitor
| Field | Type | Description |
|---|---|---|
agentTrajectory | CustomRule | |
yaml | String | |
queries | [String!] | SQL queries that will be run by the monitor on each execution. |
warnings | [String!] | Warnings about the monitor's agent, such as an agent with no recent conversation rows. A warning does not stop the save. Dry runs return the same warnings. |
Related types
AgentSpanConditionInput, AgentSpanFilterInput, AlertGroupingInput, AudienceConditionInput, CustomRule, DataSourceUnionInput, DateTime, FilterGroupInput, FilterSpanInput, ScheduleConfigInput, TagKeyValuePairInput, TimeFilterInput, TrajectoryScope, UUID
createOrUpdateAgentValidation (mutation)
createOrUpdateAgentValidation is a mutation in the Monte Carlo GraphQL API, in Agent traces and evaluations. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Create or update agent validation.
Arguments
| Argument | Type | Description |
|---|---|---|
agentSpanFilters | [AgentSpanFilterInput!]! | Filter by agent span fields (agent, workflow, task, span_name) |
alertCondition | FilterGroupInput! | |
alertGrouping | AlertGroupingInput | Per-monitor alert grouping configuration. Omit or pass null for legacy per-type grouping; a non-null value enables monitor-based alert grouping. The createOrUpdate* mutations are full-state: omitting this field on an update clears any existing configuration (same as samplingConfig). |
audienceConditions | [AudienceConditionInput!] | Narrows individual audiences to the triage priorities that reach them. Always a full replace: omitting the argument (or passing null) makes every audience unconditional, the same as passing an empty list; a non-empty list replaces the conditions wholesale. Every audience named here must also appear in this mutation's audience list (audiences, or labels on the mutations that spell it that way), which stays the monitor's full audience set — a condition narrows when one of them is notified, it does not add one. |
autoTriage | Boolean | Per-monitor automated-triage override. true forces triage on for this monitor, false forces it off, and null (or omitting the argument) clears the override so the monitor inherits the domain/account setting. Because omitting the argument clears the override, an update call that does not send this field will reset any previously set override, including a deliberate false, back to inherit. |
autoTuning | Boolean | Per-monitor auto-apply-tuning override. true forces auto-apply tuning on for this monitor, false forces it off, and null (or omitting the argument) clears the override so the monitor inherits the domain/account setting. Because omitting the argument clears the override, an update call that does not send this field will reset any previously set override, including a deliberate false, back to inherit. |
connectionId | UUID | Specify a connection (e.g. query-engine) to use |
customRuleUuid | UUID | UUID of custom rule, to update existing rule |
dataQualityDimension | String | Data quality dimension on the custom rule. |
dataSource | DataSourceUnionInput! | |
description | String! | Description of rule |
domainUuids | [UUID!] | Please provide one and only one valid domain uuid. |
dryRun | Boolean | Dry run the monitor creation or update and return the MaC YAML and queries. Default: false. |
dwId | UUID! | Warehouse UUID |
eventRollupCount | Int | The number of events to roll up into a single incident |
eventRollupUntilChanged | Boolean | If true, roll up events until the value changes |
exceptionPrimaryKeyColumn | String | Specifies the column which contains the primary key for sampled data used in exception management. |
failureAudiences | [String!] | The audiences to notify on failure |
filters | FilterGroupInput | Structured SQL filtering conditions to apply to query |
intervalMinutes | Int | How often to run scheduled custom rule check (DEPRECATED, use schedule instead) |
isAgentTraceAggregation | Boolean | If true, aggregates spans by trace_id for trace-level validation. Default (false) returns span-level data. Default: false. |
isDraft | Boolean | Make target a draft monitor. Default: false. |
isTracking | Boolean | True tracks failures without alerts; false enables alerts. Omit or use null to keep an existing monitor's mode. New monitors alert by default. |
labels | [String] | The monitor labels |
notes | String | Additional context for the monitor Default: "". |
notifyRuleRunFailure | Boolean | DEPRECATED: Completely ignored. This field has no effect on anything. Use failure_audiences to determine who is notified when run failures occur. |
priority | String | The default priority for alerts involving this monitor |
scheduleConfig | ScheduleConfigInput! | Schedule of the agent validation monitor |
severity | String | DEPRECATED. Use priority instead. The default severity for incidents involving this monitor Default: "". |
startTime | DateTime | Start time of schedule (DEPRECATED, use schedule instead) |
tags | [TagKeyValuePairInput] | The monitor tags. |
timeFilter | TimeFilterInput! | Filter by time filter for evaluation |
timeout | Int | Timeout for the SQL query |
timezone | String | Timezone (DEPRECATED, use timezone in scheduleConfig instead |
Returns
CreateOrUpdateAgentValidation
Example
mutation CreateOrUpdateAgentValidation($agentSpanFilters: [AgentSpanFilterInput!]!, $alertCondition: FilterGroupInput!, $dataSource: DataSourceUnionInput!, $description: String!, $dwId: UUID!, $scheduleConfig: ScheduleConfigInput!, $timeFilter: TimeFilterInput!) {
createOrUpdateAgentValidation(agentSpanFilters: $agentSpanFilters, alertCondition: $alertCondition, dataSource: $dataSource, description: $description, dwId: $dwId, scheduleConfig: $scheduleConfig, timeFilter: $timeFilter) {
queries
}
}Types used only by createOrUpdateAgentValidation
createOrUpdateAgentValidationCreateOrUpdateAgentValidation
CreateOrUpdateAgentValidationObject type. Create or update an agent validation monitor
| Field | Type | Description |
|---|---|---|
agentValidation | CustomRule | |
queries | [String!] | SQL queries that will be run by the monitor on each execution. |
Related types
AgentSpanFilterInput, AlertGroupingInput, AudienceConditionInput, CustomRule, DataSourceUnionInput, DateTime, FilterGroupInput, ScheduleConfigInput, TagKeyValuePairInput, TimeFilterInput, UUID
Source: The GraphQL API reference
This page is generated from the GraphQL schema on each release. Changes made in ReadMe are overwritten.
