Agent traces, part 6 of 7 (GraphQL)

Related queries and mutations in Agent traces and evaluations. Each has its own section.

Queries

getTraces (query)

getTraces 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 traces from the agent_spans table with bidirectional cursor-based pagination. Traces are aggregations of individual spans grouped by trace_id. Supports sorting by multiple fields and filtering by agent name and time range.

Arguments

ArgumentTypeDescription
inputGetTracesInput!

Returns

TraceConnection

Example

query GetTraces($input: GetTracesInput!) {
  getTraces(input: $input) {
    edges {
      cursor
    }
  }
}

Types used only by getTraces

GetTracesInput

Input object type. Input parameters for GetTraces query.

FieldTypeDescription
agentNameString!Agent name to filter by
traceTableMconString!MCON of the trace table or platform agent (aiagent object type) to query. Filters traces to only those from this data source.
startTimeDateTime!Start of time range (inclusive)
endTimeDateTime!End of time range (inclusive)
filtersTraceFiltersInputOptional filters to refine results
firstIntNumber of records to fetch for forward pagination
afterStringCursor for forward pagination
lastIntNumber of records to fetch for backward pagination
beforeStringCursor for backward pagination
sortFieldTraceSortFieldField to sort by. The cost fields (COST, QUERY_COST, TOTAL_COST) order by warehouse-priced cost — Cortex only — and attribution trails execution by about three hours, so the freshest traces sort by a lower bound of their query and total cost. Default: "trace_start_time".
sortDirectionTraceSortDirectionSort direction Default: "DESC".
Trace

Object type. Traces from the agent_spans table.

FieldTypeDescription
agentUuidUUIDAgent UUID (nullable for now, will be required in the future)
agentNameString!Agent name
traceIdString!Trace ID (hex-encoded)
traceStartTimeDateTime!Earliest span start time in trace
traceEndTimeDateTime!Latest span end time in trace
ingestStartTimeDateTime!Start of the window that contains this trace's spans on every time axis a span read may filter on — the earlier of the earliest span start time and the earliest span ingest time. Use it to bound a span-content fetch for this trace.
ingestEndTimeDateTime!End of the window described by ingestStartTime — the later of the latest span end time and the latest span ingest time.
durationSecondsFloat!Trace duration in seconds
promptTokensIntTotal prompt tokens
completionTokensIntTotal completion tokens
totalTokensIntTotal tokens
countLlmCallsInt!Number of LLM calls in trace
models[String!]!Unique models used in trace
workflows[String!]!Unique workflows in trace
tasks[String!]!Unique tasks in trace
conversationIdStringConversation ID
rootHasErrorBoolean!Whether the root span had an error
errorsCountInt!Number of spans with errors in this trace
TraceConnection

Object type. Connection type for trace pagination.

FieldTypeDescription
edges[TraceEdge!]!List of edges
pageInfoTracePageInfo!Pagination information
TraceEdge

Object type. Edge type for trace pagination.

FieldTypeDescription
nodeTrace!The trace
cursorString!Cursor for this edge
TraceSortField

Enum type. Fields that can be used for sorting traces.

The three cost fields order by a value only the customer's warehouse holds,
so they page by offset cursor rather than the keyset cursors the other
fields use. They are Cortex-only, because the sort scans the agent's
Snowflake event table and only Cortex agents have one. Any other
Timescale-served agent sorts to an empty page. The ClickHouse backend
rejects a cost sort with a validation error. QUERY_COST orders traces with
no attributed warehouse compute last in both directions -- unknown after
known. COST keeps traces whose models the price book omits; their cost is
unknown and sorts last in both directions.
Attribution trails execution by about three hours, so the freshest traces
sort by a lower bound of their query and total cost.
FEEDBACK orders by each trace's newest end-user rating: negative, unrated,
then positive ascending. Traces with no feedback sort last in both
directions. Feedback is available for Snowflake Cortex and Databricks Genie
agents, and code-based agents that send feedback to Agent Observability ClickHouse.

ValueDescription
TRACE_ID
TRACE_START_TIME
TRACE_END_TIME
DURATION_SECONDS
PROMPT_TOKENS
COMPLETION_TOKENS
TOTAL_TOKENS
COUNT_LLM_CALLS
COST
QUERY_COST
TOTAL_COST
STATUS
FEEDBACK

Related types

DateTime, TraceFiltersInput, TracePageInfo, TraceSortDirection, UUID

getTracesFilters (query)

getTracesFilters 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 metadata about filters that can be applied when requesting traces

Returns

[TraceFilter]

Example

query GetTracesFilters {
  getTracesFilters {
    fieldName
    displayName
    queryParameterName
    queryParameterAcceptsMultipleValues
    isRangeFilter
    facetable
    facetSearchable
  }
}

Types used only by getTracesFilters

TraceFilter

Object type. Metadata about a trace filter.

FieldTypeDescription
fieldNameTraceFilterFieldName!
displayNameString!
queryParameterNameString!Associated getTraces parameter used to filter traces
queryParameterAcceptsMultipleValuesBoolean!Whether the associated getTraces parameter accepts multiple values as input
isRangeFilterBoolean!Whether this is a range filter (min/max) vs equality filter (checkboxes)
facetableBoolean!Whether the filter shows up as a facet in the UI
facetSearchableBoolean!Whether the filter values can be searched by their display name

Related types

TraceFilterFieldName

getTracesFiltersData (query)

getTracesFiltersData 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 filter values with counts for trace filters (for faceted search UI)

Arguments

ArgumentTypeDescription
filtersRequest[TraceFilterDataRequest]!

Returns

[TraceFilterData]

Example

query GetTracesFiltersData($filtersRequest: [TraceFilterDataRequest]!) {
  getTracesFiltersData(filtersRequest: $filtersRequest) {
    fieldName
    hasUnvaluedTraces
  }
}

Types used only by getTracesFiltersData

TraceFilterData

Object type. Filter values with counts for a single filter.

FieldTypeDescription
fieldNameTraceFilterFieldName!The filter field name
values[TraceFilterDataValue!]!List of filter values with counts
pageInfoTraceFilterDataPageInfo!Pagination information
hasUnvaluedTracesBoolean!True when the agent also has traces carrying NO value for this field, under the same search criteria (time window and cross-filters) as values — the complement of the enumeration, independent of searchValue. Only computed for the WORKFLOW field; always false otherwise.
TraceFilterDataPageInfo

Object type. Pagination info for filter values.

FieldTypeDescription
hasNextPageBoolean!Whether there are more results
endCursorStringCursor for the next page
TraceFilterDataRequest

Input object type. Request for filter values data.

FieldTypeDescription
fieldNameTraceFilterFieldName!Filter field name to get values for
searchCriteriaTraceFilterDataSearchCriteria!Search criteria
firstIntNumber of values to return (default 50, max 250)
afterStringCursor for pagination
searchValueStringSearch string to filter values
TraceFilterDataSearchCriteria

Input object type. Search criteria for getting filter values.

FieldTypeDescription
agentNameString!Agent name
traceTableMconString!MCON of the trace table or platform agent (aiagent object type)
startTimeDateTime!Start time for traces
endTimeDateTime!End time for traces
filters[TraceFilterDataSearchCriteriaFilter]Active filters to apply (for cross-filtering)
TraceFilterDataSearchCriteriaFilter

Input object type. A filter to apply when getting filter values (for cross-filtering).

FieldTypeDescription
fieldNameTraceFilterFieldName!Filter field name
valueGenericScalarFilter value
TraceFilterDataValue

Object type. A single filter value with its count.

FieldTypeDescription
valueGenericScalar!The filter value
displayNameString!Display name for the value
countInt!Number of traces with this value

Related types

DateTime, GenericScalar, TraceFilterFieldName

getTraceTimeSeries (query)

getTraceTimeSeries 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 time series metrics for agent traces. Returns time-bucketed aggregations of trace metrics like count, latency percentiles, and token usage. Supports segmentation by workflow, task, or model.

Arguments

ArgumentTypeDescription
inputGetTraceTimeSeriesInput!

Returns

[TraceTimeSeriesType]

Example

query GetTraceTimeSeries($input: GetTraceTimeSeriesInput!) {
  getTraceTimeSeries(input: $input) {
    metric
    segment
  }
}

Types used only by getTraceTimeSeries

GetTraceTimeSeriesInput

Input object type. Input parameters for GetTraceTimeSeries query.

FieldTypeDescription
agentNameString!Agent name to filter by
traceTableMconString!MCON of the trace table or platform agent (aiagent object type) to query
startTimeDateTime!Start of time range (inclusive)
endTimeDateTime!End of time range (inclusive)
bucketSizeTraceBucketSize!Size of time buckets (MINUTE, HOUR, DAY, WEEK)
metricGroupTraceMetricGroupMetric group to return. Each group maps to a set of metrics: OVERVIEW (count + latency + tokens), TRACE_COUNT (total traces + change in traces), TRACE_LATENCY (avg/p50/p95/p99), ERRORS (error count + error percentage), TOKENS (total/prompt/completion tokens), FEEDBACK (positive/negative feedback counts + negative feedback percentage). Deprecated: use metricGroups instead.
metricGroups[TraceMetricGroup!]Metric groups to return from one read, with duplicate metrics returned once. Provide a non-empty list or metricGroup, exclusively. The groups are those of metricGroup.
segmentFilterTraceSegmentFilterInputOptional segment dimension filter. Specifies the field to group results by (MODEL, WORKFLOW, or TASK) and an optional list of values to restrict results to. An empty values list returns all values for that dimension.
filtersTraceFiltersInputOptional filters to refine results
TraceMetricGroup

Enum type. Metric groups for time series queries.

Each group maps to a set of individual TraceTimeSeriesMetric values.
Use METRIC_GROUP_TO_METRICS to expand a group to its metrics.

ValueDescription
OVERVIEW
TRACE_COUNT
TRACE_LATENCY
ERRORS
TOKENS
FEEDBACK
TraceTimeSeriesMetric

Enum type. Metrics available for time series queries.

ValueDescription
TRACE_COUNT
CHANGE_IN_TRACES
LATENCY_AVG
LATENCY_P50
LATENCY_P95
LATENCY_P99
TOTAL_TOKENS
PROMPT_TOKENS
COMPLETION_TOKENS
ERROR_COUNT
ERROR_PERCENTAGE
POSITIVE_FEEDBACK_COUNT
NEGATIVE_FEEDBACK_COUNT
NEGATIVE_FEEDBACK_PERCENTAGE
TraceTimeSeriesType

Object type. Time series data for a single metric.

When segmentBy is used, multiple TraceTimeSeries objects are returned per metric,
one for each unique segment value (e.g., one per workflow name).

FieldTypeDescription
metricTraceTimeSeriesMetric!The metric this series represents
buckets[TraceTimeSeriesBucketType!]!Time-bucketed data points
segmentStringSegment value (e.g., workflow name) if segmentBy was requested

Related types

DateTime, TraceBucketSize, TraceFiltersInput, TraceSegmentFilterInput, TraceTimeSeriesBucketType

Mutations

addConversationToGoldenSet (mutation)

addConversationToGoldenSet 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

Snapshot a conversation turn into a golden set.

Arguments

ArgumentTypeDescription
inputAddConversationToGoldenSetInput!

Returns

AddConversationToGoldenSet

Example

mutation AddConversationToGoldenSet($input: AddConversationToGoldenSetInput!) {
  addConversationToGoldenSet(input: $input) {
    goldenTestCase {
      uuid
      userInput
      isMultiTurn
      contextTurnCount
      hasReference
      targetResponseCaptured
      targetTurnIndex
      sourceConversationId
      sourceTraceId
      sourceAgedOut
      createdTime
    }
  }
}

Types used only by addConversationToGoldenSet

AddConversationToGoldenSet

Object type.

FieldTypeDescription
goldenTestCaseGoldenTestCase
AddConversationToGoldenSetInput

Input object type.

FieldTypeDescription
setUuidUUID!Target set to add the case to.
agentNameString!Source conversation agent name.
traceTableMconString!MCON of the agent's trace table.
conversationIdString!Source conversation id.
startTimeDateTime!Conversation window start.
endTimeDateTime!Conversation window end.
targetTurnIndexInt!Turn to capture; preceding turns become fixed context, following dropped.
referenceAnswerStringOptional golden answer for correctness-style scoring.
captureResponseBooleanWhether to also capture the target turn's original response. Default: false.

Related types

DateTime, GoldenTestCase, UUID

configureLinearIntegration (mutation)

configureLinearIntegration 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

Step 1 of 2: store the account's Linear API token and return the webhook URL. Register the URL in Linear, then call setLinearWebhookSecret to finish setup.

Arguments

ArgumentTypeDescription
inputConfigureLinearIntegrationInput!

Returns

ConfigureLinearIntegration

Example

mutation ConfigureLinearIntegration($input: ConfigureLinearIntegrationInput!) {
  configureLinearIntegration(input: $input) {
    integration {
      uuid
      webhookUrl
      webhookEnabled
      defaultTeamId
      integrationName
    }
  }
}

Types used only by configureLinearIntegration

ConfigureLinearIntegration

Object type.

FieldTypeDescription
integrationLinearIntegrationResult
ConfigureLinearIntegrationInput

Input object type.

FieldTypeDescription
apiTokenString!Linear API token to store.
defaultTeamIdStringLinear team ID new tickets default to.

Related types

LinearIntegrationResult

createGoldenSet (mutation)

createGoldenSet 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 a golden set.

Arguments

ArgumentTypeDescription
inputCreateGoldenSetInput!

Returns

CreateGoldenSet

Example

mutation CreateGoldenSet($input: CreateGoldenSetInput!) {
  createGoldenSet(input: $input) {
    goldenSet {
      uuid
      name
      agentName
      traceTableMcon
      prodTargetPath
      devTargetPath
      evalConfig
      retentionDays
      testCaseCount
      lastUsedAt
      expiresAt
      createdTime
      updatedTime
    }
  }
}

Types used only by createGoldenSet

CreateGoldenSet

Object type.

FieldTypeDescription
goldenSetGoldenSet
CreateGoldenSetInput

Input object type.

FieldTypeDescription
nameString!Display name of the set.
agentNameString!Observability agent to scope the set to.
traceTableMconString!MCON of the scoped agent's trace table.
prodTargetPathStringBaseline (prod) agent REST endpoint path.
devTargetPathStringDefault test (dev) agent REST endpoint path.
evalConfigGenericScalarRubric config the baseline scores against: {"rules": [...]} where each rule sets exactly one of templateName (a catalog conversation-eval template) or custom.criteria (a non-empty, ≤1000-char rubric). At most 5 rules, at most one custom rule, no duplicate template. Rejected at generateGoldenBaseline if malformed.
retentionDaysIntRetention window in days (defaults to 90).

Related types

GenericScalar, GoldenSet

createJiraTicketForAgentHealthIssue (mutation)

createJiraTicketForAgentHealthIssue 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 a Jira ticket for an agent-health issue

Arguments

ArgumentTypeDescription
inputCreateJiraTicketForAgentHealthIssueInput!

Returns

CreateJiraTicketForAgentHealthIssue

Example

mutation CreateJiraTicketForAgentHealthIssue($input: CreateJiraTicketForAgentHealthIssueInput!) {
  createJiraTicketForAgentHealthIssue(input: $input) {
    ticket {
      identifier
      url
      origin
      createdTime
    }
  }
}

Types used only by createJiraTicketForAgentHealthIssue

CreateJiraTicketForAgentHealthIssue

Object type.

FieldTypeDescription
ticketAgentHealthIssueJiraTicket
CreateJiraTicketForAgentHealthIssueInput

Input object type.

FieldTypeDescription
findingUuidUUID!UUID of the reinforcement-loop issue to act on — the issueUuid of a getReinforcementLoopV2Issues node, stable across runs.
integrationIdUUID!UUID of the Jira integration to create the ticket under.
projectInt!Jira project id.
issuetypeInt!Jira issue-type id.
summaryStringTicket summary; defaults to the issue title.
descriptionStringTicket description; defaults to the issue's action context.
fieldsJSONStringAdditional Jira fields keyed by field id (e.g. required custom fields).

Related types

AgentHealthIssueJiraTicket, JSONString, UUID

createLinearTicketForAgentHealthIssue (mutation)

createLinearTicketForAgentHealthIssue 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 a Linear ticket for an agent-health issue

Arguments

ArgumentTypeDescription
inputCreateLinearTicketForAgentHealthIssueInput!

Returns

CreateLinearTicketForAgentHealthIssue

Example

mutation CreateLinearTicketForAgentHealthIssue($input: CreateLinearTicketForAgentHealthIssueInput!) {
  createLinearTicketForAgentHealthIssue(input: $input) {
    ticket {
      identifier
      url
      status
      createdTime
    }
  }
}

Types used only by createLinearTicketForAgentHealthIssue

CreateLinearTicketForAgentHealthIssue

Object type.

FieldTypeDescription
ticketAgentHealthIssueLinearTicket
CreateLinearTicketForAgentHealthIssueInput

Input object type.

FieldTypeDescription
findingUuidUUID!UUID of the reinforcement-loop issue to act on — the issueUuid of a getReinforcementLoopV2Issues node, stable across runs.
titleStringTicket title; defaults to the issue title.
descriptionStringTicket description; defaults to the issue's action context.
teamIdStringLinear team ID; defaults to the integration's default team.

Related types

AgentHealthIssueLinearTicket, UUID

createOrUpdateAgentTraceTable (mutation)

createOrUpdateAgentTraceTable 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 trace table

Arguments

ArgumentTypeDescription
inputCreateOrUpdateAgentTraceTableInput!

Returns

CreateOrUpdateAgentTraceTable

Example

mutation CreateOrUpdateAgentTraceTable($input: CreateOrUpdateAgentTraceTableInput!) {
  createOrUpdateAgentTraceTable(input: $input) {
    agentTraceTable {
      createdTime
      updatedTime
      id
      uuid
      spanFormat
      recommendationsGeneratedAt
      supportsConversationEval
      supportsConversationClustering
      supportsTokenMetrics
    }
  }
}

Types used only by createOrUpdateAgentTraceTable

AgentTraceFormatEnum

Enum type. Enum for agent trace format types.

ValueDescription
STANDARD
STRANDS
CreateOrUpdateAgentTraceTable

Object type.

FieldTypeDescription
agentTraceTableAgentTraceTable
CreateOrUpdateAgentTraceTableInput

Input object type.

FieldTypeDescription
uuidUUIDUUID of existing agent trace table to update
mconString!MCON of the table
connectionUuidUUID!Connection UUID to query the table
spanFormatAgentTraceFormatEnumFormat of spans in the table

Related types

AgentTraceTable, UUID

createOrUpdateConversationClusteringSpace (mutation)

createOrUpdateConversationClusteringSpace 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 a conversation-clustering space: scope, facet, config overrides, guidance, and pause/resume. Creating with facet omitted opts into both an intent and an issue space for the scope in one call.

Arguments

ArgumentTypeDescription
inputCreateOrUpdateConversationClusteringSpaceInput!

Returns

CreateOrUpdateConversationClusteringSpace

Example

mutation CreateOrUpdateConversationClusteringSpace($input: CreateOrUpdateConversationClusteringSpaceInput!) {
  createOrUpdateConversationClusteringSpace(input: $input) {
    space {
      uuid
      agentName
      scopeWorkflow
      facet
      isEnabled
      taxonomyVersion
      discoveryCompletedAt
      userGuidance
      state
      clustersWithheldReason
      classificationWatermark
      budgetLimited
      dailyClassificationBudget
      trailingDaySpend
    }
  }
}

Types used only by createOrUpdateConversationClusteringSpace

ClusteringConfigInput

Input object type.

FieldTypeDescription
discoveryModelIdStringModel id for the one-time taxonomy synthesis.
classifyModelIdStringModel id for per-conversation classification (and discovery summaries).
embeddingModelIdStringWarehouse embedding model producing 1024 dimensions. Defaults to snowflake-arctic-embed-l-v2.0-8k for Cortex and databricks-gte-large-en for Genie. Applies to platform intent spaces.
embeddingInputCharCapIntMaximum rendered conversation characters sent to the embedding model. Choose a cap within the selected model's token window.
maxClustersIntCap on discovered clusters (excludes the Uncategorized bucket).
discoverySampleSizeIntNumber of newest eligible conversations fed to discovery.
discoveryLookbackDaysIntMaximum history, in days, discovery scans back to fill its sample.
classifyCapPerRunIntMaximum conversations classified per run, oldest by readiness first.
minConfidenceFloatConfidence below which a label is dropped. On Intent spaces, the conversation routes to Uncategorized.
userInputCharCapIntPer-turn cap on user-input characters sent to the model.
agentResponseCharCapIntPer-turn cap on agent-response characters sent to the model.
minConversationsIntMinimum historical conversation count before clustering activates: on intent spaces, the discovery activation floor; on issue spaces, the minimum conversations in the percentile trailing window before percentile clusters assign.
classifyCadenceMinutesIntMinimum minutes between COMPLETED runs of a kind before the orchestrator dispatches the next — it paces a space's runs (on intent spaces, classification and pre-taxonomy discovery dispatch; on issue spaces, rule evaluation). A run that left claimable backlog re-dispatches on the next tick. A single failed run is retried on the next tick rather than waiting out this interval; consecutive failures back off exponentially, capped at this interval.
issueWatermarkRangeMinutesIntMinutes covered by each platform-agent issue-space watermark work item. Minimum 30.
issueWatermarkBatchSizeIntMaximum adjacent watermark slices produced or consumed together for a platform-agent issue space. Must be a positive integer.
backfillSliceHoursIntHours covered by each BACKFILL and lookback work item. Wider than a watermark range because this work drains in the background; bounded so one item's rule matches still fit a single read.
issueInitialBackfillDaysIntDays of retained history queued when an issue space is first enabled. The queued range is capped by the 30-day retention window.
dailyClassificationBudgetIntMaximum conversations classified per trailing 24 hours, summed from COMPLETED runs' processed counts (bootstrap sweeps included; rule evaluation is exempt). At or over budget the space isn't dispatched — the coverage watermark holds and scanning resumes oldest-first when budget frees, so nothing is dropped, only delayed.
workItemBatchCapIntMaximum work items one consumer run claims from the space's list. Each item is a chunk of conversations.
collectionLagHoursIntSettle window in hours before a conversation's last turn counts.
percentileWindowDaysIntTrailing window, in days, over which issue-space percentile thresholds (e.g. p95 duration) are resolved each run. Issue spaces only — rejected on intent spaces.
evalScoreThresholdFloatFallback bar for numeric evals whose monitor has no fixed alert threshold, as a score above 1 and up to 5. It moves to the same place on each judge's scale, and a higher value fails more conversations. Conversations scoring on the failing side of it join that eval's issue cluster. Issue spaces only — rejected on intent spaces.
CreateOrUpdateConversationClusteringSpace

Object type.

FieldTypeDescription
spaceConversationClusteringSpaceTypeDEPRECATED. End of life: February 1, 2027. The primary space touched by this call: the created/updated space for an update or single-facet create; the intent space on the create-both opt-in (facet omitted, no spaceUuid) — kept so existing callers that only read space see unchanged behavior. See spaces to read both facets. Deprecated: Use spaces, which lists every space this call touched..
spaces[ConversationClusteringSpaceType!]!Every space this call touched: one entry for an update or single-facet create; both the intent and issue spaces, in that order, for the create-both opt-in.
CreateOrUpdateConversationClusteringSpaceInput

Input object type.

FieldTypeDescription
spaceUuidUUIDSet to update an existing space; null to create.
agentNameStringRequired on create; immutable on update.
traceTableMconStringRequired on create; immutable on update.
scopeWorkflowStringNull = whole agent; set on create, immutable.
facetClusteringFacetOn create: which facet to create. Omit to opt in to both an intent and an issue space for the scope in one call — the enablement toggle's shape. configOverrides and userGuidance then land on the intent space only; the issue space is created with its facet defaults — tune its cadence or percentile window with a follow-up update against its own uuid, the same way pause already works. Set explicitly to create only that facet's space. On update: immutable — must match the target space's facet.
isEnabledBooleanPause (false) / resume (true) an existing space. On the create-both opt-in (facet omitted, no spaceUuid), applies to both spaces.
userGuidanceStringFree-text guidance that steers cluster identity during discovery; rejected on an issue-facet space, which has no discovery step. On the create-both opt-in, applies to the intent space only.
configOverridesClusteringConfigInputPartial config overrides applied on top of the current settings. On the create-both opt-in, applies to the intent space only.

Related types

ClusteringFacet, ConversationClusteringSpaceType, UUID

createOrUpdateCustomConversationCluster (mutation)

createOrUpdateCustomConversationCluster 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 a custom (user-defined) conversation cluster on an intent clustering space (at most 10 per space). Creating one triggers a bounded re-classification sweep over recent history; recreating a deleted cluster with the same name restores it, trend history intact. Updates apply to future classification only.

Arguments

ArgumentTypeDescription
inputCreateOrUpdateCustomConversationClusterInput!

Returns

CreateOrUpdateCustomConversationCluster

Example

mutation CreateOrUpdateCustomConversationCluster($input: CreateOrUpdateCustomConversationClusterInput!) {
  createOrUpdateCustomConversationCluster(input: $input) {
    cluster {
      uuid
      clusterKey
      name
      description
      classificationCriteria
      exemplars
      exemplarsWithheldReason
      ordinal
      taxonomyVersion
      derivation
      source
      createdBy
      rule
      sourceMonitorUuid
    }
  }
}

Types used only by createOrUpdateCustomConversationCluster

CreateOrUpdateCustomConversationCluster

Object type.

FieldTypeDescription
clusterConversationClusterType!
CreateOrUpdateCustomConversationClusterInput

Input object type.

FieldTypeDescription
spaceUuidUUID!The cluster's clustering space, of either facet. On create, the space to add the cluster to; on update, it must match the target cluster's space — a mismatch reads as an unknown cluster.
clusterUuidUUIDSet to update an existing custom cluster; null to create one.
nameString!Display name. On create it also derives the stable cluster key; renaming later never changes the key, so trends survive a rename.
descriptionString!What belongs in this cluster — shown on the card and used verbatim as the classification criteria, so write it for the classifier.

Related types

ConversationClusterType, UUID

createOrUpdatePlatformAgent (mutation)

createOrUpdatePlatformAgent 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 a platform agent

Arguments

ArgumentTypeDescription
inputCreateOrUpdatePlatformAgentInput!

Returns

CreateOrUpdatePlatformAgent

Example

mutation CreateOrUpdatePlatformAgent($input: CreateOrUpdatePlatformAgentInput!) {
  createOrUpdatePlatformAgent(input: $input) {
    platformAgent {
      id
      createdTime
      updatedTime
      uuid
      agentType
      agentMcon
      agentName
      agentDatabase
      agentSchema
      tablePrefix
      recommendationsGeneratedAt
      displayName
      supportsConversationEval
      supportsConversationClustering
      supportsTokenMetrics
      supportsEndUserFeedback
      traceTableMcon
      traceTableIngested
    }
  }
}

Types used only by createOrUpdatePlatformAgent

CreateOrUpdatePlatformAgent

Object type.

FieldTypeDescription
platformAgentPlatformAgent
CreateOrUpdatePlatformAgentInput

Input object type.

FieldTypeDescription
warehouseUuidUUID!Warehouse UUID
agentNameString!Agent name on the platform
agentDatabaseString!Platform database containing the agent. For Databricks platform agents this is the Unity Catalog catalog name. For Agentforce this is the Salesforce organization ID.
agentSchemaString!Platform schema containing the agent. For Databricks platform agents this is the Unity Catalog schema name. For Agentforce this is the Data Cloud dataspace API name.
connectionUuidUUIDSource connection UUID. When omitted, keeps an existing agent's native schedule connection or saved export source. A new Genie agent reuses the collector connection at its location. Otherwise selects an allowed SQL connection on the warehouse. The chosen connection requires permission to use it.
domainUuidUUIDDomain to assign a Snowflake or Agentforce agent to (may be required for accounts using domain-based access); the caller needs monitor write access to it. Adding a domain preserves existing domain memberships. Not accepted for Databricks agents — their domains derive from the trace table's catalog domain assignments. An Agentforce registration shares this assignment with its imported ClickHouse agent.
platformAgentTypePlatformAgentTypePlatform agent integration type. Defaults to SNOWFLAKE when omitted, preserving backwards compatibility for Snowflake callers. Databricks Agent Bricks splits into two physical span shapes: DATABRICKS_MLFLOW_SDK (Mosaic AI Agent Framework + autolog) and DATABRICKS_MLFLOW_KA (Knowledge Assistant UI sync). The SDK and KA shapes differ on disk, so registration resolves the subtype from the trace table's physical shape — overriding the supplied value, and rejecting a fresh registration when the shape can't be resolved to exactly one of the two.
tablePrefixStringTrace-table identifier prefix. A blank value is treated as omitted. Databricks Genie defaults to its collector table. On Snowflake the prefix is optional and must match the saved value on re-registration. Databricks MLflow agents require a prefix. For DATABRICKS_MLFLOW_SDK it names the <table_prefix>_trace_unified view over <table_prefix>_otel_* tables. For DATABRICKS_MLFLOW_KA it is the Delta table name.
autoSetupOverrideAgentAutoSetupChoiceNative automatic setup choice. Omit to preserve the saved choice. When the account’s writesEnabled is false, omit this field or registration is refused.

Related types

AgentAutoSetupChoice, PlatformAgent, PlatformAgentType, UUID

createServiceNowTicketForAgentHealthIssue (mutation)

createServiceNowTicketForAgentHealthIssue 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 a ServiceNow incident for an agent-health issue

Arguments

ArgumentTypeDescription
inputCreateServiceNowTicketForAgentHealthIssueInput!

Returns

CreateServiceNowTicketForAgentHealthIssue

Example

mutation CreateServiceNowTicketForAgentHealthIssue($input: CreateServiceNowTicketForAgentHealthIssueInput!) {
  createServiceNowTicketForAgentHealthIssue(input: $input) {
    createWarning
  }
}

Types used only by createServiceNowTicketForAgentHealthIssue

CreateServiceNowTicketForAgentHealthIssue

Object type.

FieldTypeDescription
ticketAgentHealthIssueServiceNowTicket
createWarningStringA non-fatal warning from ServiceNow — e.g. a field it silently dropped because the value was invalid. The incident was still created; surface this to the user (a toast) so they can fix the field. Null on success. This warning surface is ServiceNow-specific and has no Jira-mutation equivalent, so a shared frontend create-ticket handler must special-case it.
CreateServiceNowTicketForAgentHealthIssueInput

Input object type.

FieldTypeDescription
findingUuidUUID!UUID of the reinforcement-loop issue to act on — the issueUuid of a getReinforcementLoopV2Issues node, stable across runs.
integrationIdUUID!UUID of the ServiceNow integration to create the incident under.
shortDescriptionStringIncident short description (its title); defaults to the issue title, falling back to a generic placeholder if the issue has none.
descriptionStringIncident description; defaults to the issue's action context, falling back to its narrative, and finally to an empty description.
fieldsJSONStringAdditional ServiceNow incident fields keyed by field name.

Related types

AgentHealthIssueServiceNowTicket, JSONString, UUID

deleteAgentCostRate (mutation)

deleteAgentCostRate 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

Delete an agent cost rate. Agents it priced fall back to the account-wide rate. Without one, they go back to their billing unit. Requires the AI agent settings edit permission.

Arguments

ArgumentTypeDescription
rateUuidUUID!Rate to delete.

Returns

DeleteAgentCostRate

Example

mutation DeleteAgentCostRate($rateUuid: UUID!) {
  deleteAgentCostRate(rateUuid: $rateUuid) {
    success
  }
}

Types used only by deleteAgentCostRate

DeleteAgentCostRate

Object type.

FieldTypeDescription
successBooleanWhether the rate was deleted.

Related types

UUID

deleteAgentTraceTable (mutation)

deleteAgentTraceTable 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

Delete an agent trace table

Arguments

ArgumentTypeDescription
inputDeleteAgentTraceTableInput!

Returns

DeleteAgentTraceTable

Example

mutation DeleteAgentTraceTable($input: DeleteAgentTraceTableInput!) {
  deleteAgentTraceTable(input: $input) {
    success
  }
}

Types used only by deleteAgentTraceTable

DeleteAgentTraceTable

Object type.

FieldTypeDescription
successBooleanWhether the agent trace table was successfully deleted
DeleteAgentTraceTableInput

Input object type.

FieldTypeDescription
uuidUUID!UUID of the agent trace table to delete

Related types

UUID

deleteConversationClusteringSpace (mutation)

deleteConversationClusteringSpace 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

Delete a clustering space, its taxonomy clusters, and its run history. Existing per-conversation assignments become unreachable and age out.

Arguments

ArgumentTypeDescription
spaceUuidUUID!

Returns

DeleteConversationClusteringSpace

Example

mutation DeleteConversationClusteringSpace($spaceUuid: UUID!) {
  deleteConversationClusteringSpace(spaceUuid: $spaceUuid) {
    success
  }
}

Types used only by deleteConversationClusteringSpace

DeleteConversationClusteringSpace

Object type.

FieldTypeDescription
successBoolean!

Related types

UUID

deleteCustomConversationCluster (mutation)

deleteCustomConversationCluster 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

Soft-delete a custom conversation cluster. Its card disappears immediately; recreating a cluster with the same name restores it, trend history intact.

Arguments

ArgumentTypeDescription
clusterUuidUUID!

Returns

DeleteCustomConversationCluster

Example

mutation DeleteCustomConversationCluster($clusterUuid: UUID!) {
  deleteCustomConversationCluster(clusterUuid: $clusterUuid) {
    success
  }
}

Types used only by deleteCustomConversationCluster

DeleteCustomConversationCluster

Object type.

FieldTypeDescription
successBoolean!

Related types

UUID

deleteGoldenSet (mutation)

deleteGoldenSet 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

Delete a golden set and its test cases.

Arguments

ArgumentTypeDescription
setUuidUUID!Set to delete.

Returns

DeleteGoldenSet

Example

mutation DeleteGoldenSet($setUuid: UUID!) {
  deleteGoldenSet(setUuid: $setUuid) {
    success
  }
}

Types used only by deleteGoldenSet

DeleteGoldenSet

Object type.

FieldTypeDescription
successBooleanWhether the set was deleted.

Related types

UUID

deleteGoldenTestCase (mutation)

deleteGoldenTestCase 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

Delete a golden test case.

Arguments

ArgumentTypeDescription
caseUuidUUID!Test case to delete.

Returns

DeleteGoldenTestCase

Example

mutation DeleteGoldenTestCase($caseUuid: UUID!) {
  deleteGoldenTestCase(caseUuid: $caseUuid) {
    success
  }
}

Types used only by deleteGoldenTestCase

DeleteGoldenTestCase

Object type.

FieldTypeDescription
successBooleanWhether the test case was deleted.

Related types

UUID

deleteLlmPriceBookOverride (mutation)

deleteLlmPriceBookOverride 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

Delete an LLM price book override. Costs for the pair fall back to the shipped rate. Requires the AI agent settings edit permission.

Arguments

ArgumentTypeDescription
overrideUuidUUID!Override to delete.

Returns

DeleteLlmPriceBookOverride

Example

mutation DeleteLlmPriceBookOverride($overrideUuid: UUID!) {
  deleteLlmPriceBookOverride(overrideUuid: $overrideUuid) {
    success
  }
}

Types used only by deleteLlmPriceBookOverride

DeleteLlmPriceBookOverride

Object type.

FieldTypeDescription
successBooleanWhether the override was deleted.

Related types

UUID

deletePlatformAgent (mutation)

deletePlatformAgent 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

Delete a platform agent. For Agentforce, removes its shared domain assignments and requires monitor write access in every affected domain. Previously imported traces are retained.

Arguments

ArgumentTypeDescription
agentMconString!MCON of the platform agent to delete

Returns

DeletePlatformAgent

Example

mutation DeletePlatformAgent($agentMcon: String!) {
  deletePlatformAgent(agentMcon: $agentMcon) {
    success
  }
}

Types used only by deletePlatformAgent

DeletePlatformAgent

Object type.

FieldTypeDescription
successBooleanWhether the platform agent was successfully deleted

deleteReinforcementLoopIssuesByIssueId (mutation)

deleteReinforcementLoopIssuesByIssueId 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

Delete reinforcement-loop issues by uuid. A deleted issue never resurfaces; if the agent reports the same problem again it starts over as a brand-new issue.

Arguments

ArgumentTypeDescription
issueUuids[UUID!]!UUIDs of the issues to delete — each the issueUuid of a getReinforcementLoopV2Issues node. Unknown and already-deleted uuids are skipped.

Returns

DeleteReinforcementLoopIssuesByIssueId

Example

mutation DeleteReinforcementLoopIssuesByIssueId($issueUuids: [UUID!]!) {
  deleteReinforcementLoopIssuesByIssueId(issueUuids: $issueUuids) {
    deletedCount
  }
}

Types used only by deleteReinforcementLoopIssuesByIssueId

DeleteReinforcementLoopIssuesByIssueId

Object type.

FieldTypeDescription
deletedCountInt!Number of issues actually deleted.

Related types

UUID

discoverRecentAgents (mutation)

discoverRecentAgents 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

Records agents that sent traces in the last two hours, so a new or returning agent counts as recently active before the next scheduled refresh. A call shortly after another one for the same account and set of trace tables returns 0 without reading. When newAgentCount is above zero, read the agent list again.

Returns

DiscoverRecentAgents

Example

mutation DiscoverRecentAgents {
  discoverRecentAgents {
    newAgentCount
  }
}

Types used only by discoverRecentAgents

DiscoverRecentAgents

Object type.

FieldTypeDescription
newAgentCountInt!How many agents you can see that this call recorded or re-stamped. Zero when there were none, when a recent call already ran, or when the span read or the registry write failed.

generateGoldenBaseline (mutation)

generateGoldenBaseline 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

Score a golden set's cases and overwrite its current baseline.

Arguments

ArgumentTypeDescription
setUuidUUID!Golden set to generate a baseline for.
targetPathStringAgent REST endpoint path to hit; defaults to the set's prod target path.

Returns

GenerateGoldenBaseline

Example

mutation GenerateGoldenBaseline($setUuid: UUID!) {
  generateGoldenBaseline(setUuid: $setUuid) {
    baseline {
      uuid
      status
      summary
      isStale
      targetRef
      agentConfigSnapshot
      createdTime
      updatedTime
    }
  }
}

Types used only by generateGoldenBaseline

GenerateGoldenBaseline

Object type.

FieldTypeDescription
baselineGoldenBaseline

Related types

GoldenBaseline, UUID

ignoreReinforcementLoopIssue (mutation)

ignoreReinforcementLoopIssue 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

Marks the issue ignored with a reason. The scheduled digest leaves ignored issues out. Ignoring again replaces the reason. unignoreReinforcementLoopIssue restores the issue. Monte Carlo staff can't ignore issues.

Arguments

ArgumentTypeDescription
commentString
issueUuidUUID!The issueUuid of a getReinforcementLoopV2Issues node.
reasonReinforcementLoopIssueDispositionReason!

Returns

IgnoreReinforcementLoopIssue

Example

mutation IgnoreReinforcementLoopIssue($issueUuid: UUID!, $reason: ReinforcementLoopIssueDispositionReason!) {
  ignoreReinforcementLoopIssue(issueUuid: $issueUuid, reason: $reason) {
    issueUuid
  }
}

Types used only by ignoreReinforcementLoopIssue

IgnoreReinforcementLoopIssue

Object type.

FieldTypeDescription
issueUuidUUID!

Related types

ReinforcementLoopIssueDispositionReason, UUID

Source: The GraphQL API reference

This page is generated from the GraphQL schema on each release. Changes made in ReadMe are overwritten.