Agent traces, part 2 of 7 (GraphQL)

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

Queries

getAgentMetadataV2 (query)

getAgentMetadataV2 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 AI agents including both trace table and platform agents

Arguments

ArgumentTypeDescription
startTimeDateTimeOnly include agents seen at or after this time
domainUuidUUIDFilter results to only include MCONs assigned to this domain UUID

Returns

[AgentMetadataV2]

Example

query GetAgentMetadataV2 {
  getAgentMetadataV2 {
    accountUuid
    agentName
    displayName
    traceTableMcon
    agentMcon
    sourceType
    agentReference
    lastSeenAt
    splitBy
  }
}

Types used only by getAgentMetadataV2

AgentMetadataV2

Object type. Metadata about AI agents for agent observability (v2 — includes platform agents).

FieldTypeDescription
accountUuidUUID!Account UUID
agentNameString!Name of the agent
displayNameString!Human-friendly name to show for the agent — the Databricks Agent Bricks tile name for Knowledge-Assistant agents. Falls back to agentName when no friendly name is stored (SDK / Snowflake agents and user-managed trace tables), so it is always safe to display directly.
traceTableMconString!MCON of the trace table or platform agent
agentMconStringMCON that identifies this agent itself, distinct from every other agent sharing its trace table. Assign it to a domain to scope the domain to this agent. Keep using traceTableMcon to query the agent's traces. Null while the agent's identity is not yet available.
sourceTypeAgentSourceType!Source type: TRACE_TABLE for user-managed trace tables, PLATFORM_AGENT for platform agents
agentReferenceStringThe value to pass as the agent field of the createOrUpdateAgent*MonitorFromDefinition mutations. For a PLATFORM_AGENT this is the portable {database}:{schema}.{name} reference; for a TRACE_TABLE (OTel) agent it is the service_name, which equals agentName.
warehouseWarehouseWarehouse (resource) that owns this agent's trace table or platform-agent registration. Pass its uuid (or name) as the required warehouse argument of the createOrUpdateAgent*MonitorFromDefinition mutations — no separate warehouse lookup or trace-table MCON parsing needed. Null when the agent's warehouse association cannot be resolved (e.g. the warehouse was deleted).
classificationAgentClassificationOutputAI-590/AI-598 classification of this agent — same builder and identical lowercase wire values as the incident-keyed TSA REST agent object and getAgentClassification, so consumers share one parser across surfaces (AO-891). Note the intentional casing split with this node's legacy sourceType enum (uppercase member names).
lastSeenAtDateTimeWhen this agent last produced a trace; a row whose observation carried no timestamp carries its record time instead (or the registration's created time for agents recorded from the registration index). An agent stays listed after it goes quiet, reporting zero traces, so this is how long it has been silent.
workflowAgents[WorkflowAgent!]!The agent's workflow agents, most recently seen first. Empty unless the agent is split by workflow. Lists only workflows seen in the last 30 days, and only since startTime when it is later. Lists at most 200 of them.
splitByObservedAgentSplitByHow the agent splits into workflow agents. Null: not split. Read from the agent registry, so a split agent with no recent workflow still reports it.
WorkflowAgent

Object type. One workflow of an agent split by workflow, listed as its own agent.

FieldTypeDescription
workflowString!The workflow value.
lastSeenAtDateTime!When the newest trace whose first workflow is this value reached this agent: the earliest start time of the agent's own spans in that trace.

Related types

AgentClassificationOutput, AgentSourceType, DateTime, ObservedAgentSplitBy, UUID, Warehouse

getAgentObservabilityBillingInfo (query)

getAgentObservabilityBillingInfo 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 observability billing breakdown: active agents, monitors targeting those agents, and the resulting tier

Returns

AgentObservabilityBillingInfo

Example

query GetAgentObservabilityBillingInfo {
  getAgentObservabilityBillingInfo {
    numAgents
    numMonitors
    sizeTier
    totalScale
    dailyCredits
  }
}

Types used only by getAgentObservabilityBillingInfo

AgentObservabilityBillingAgent

Object type. An active agent counted for billing purposes.

FieldTypeDescription
agentNameString!Name of the agent
traceTableMconString!MCON of the trace table or platform agent
sourceTypeAgentSourceType!TRACE_TABLE or PLATFORM_AGENT
AgentObservabilityBillingInfo

Object type. Billing breakdown for agent observability — active agents, monitors, and tier.

FieldTypeDescription
numAgentsInt!Number of active agents
numMonitorsInt!Number of monitors for active agents
sizeTierString!Billing size tier
totalScaleInt!Scale factor for the tier
dailyCreditsInt!Daily credits for the tier
agents[AgentObservabilityBillingAgent!]!List of active agents counted for billing

Related types

AgentSourceType

getAgentObservabilitySummary (query)

getAgentObservabilitySummary 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

Summarize observed agents and known data dependencies for a time window. Unavailable metrics are null.

Arguments

ArgumentTypeDescription
startTimeDateTime!
endTimeDateTime!
domainUuidUUID

Returns

AgentObservabilitySummary

Example

query GetAgentObservabilitySummary($startTime: DateTime!, $endTime: DateTime!) {
  getAgentObservabilitySummary(startTime: $startTime, endTime: $endTime) {
    startTime
    endTime
    generatedTime
    instrumentedAgentCount
    hasConfiguredAgentSource
    agentsWithOpenIssuesCount
    agentsOnAlertedDataCount
    agentReadTableCount
    unmonitoredAgentReadTableCount
    recentAlertsOnAgentReadTablesCount
    agentsWithRecentAlertsOnReadTablesCount
    totalRuns
    runSuccessRate
    p95LatencySeconds
    averageLatencySeconds
    totalTraces
    errorCount
    evalScore
    unavailableFields
  }
}

Types used only by getAgentObservabilitySummary

AgentObservabilitySummary

Object type. Observed agents and current known dependencies for an alert window.

Selected metrics that are null are unavailable; unavailableFields lists the
selected fields that are null.
totalRuns, run success rate, p95 latency, historical comparisons, and evals are not
yet available.

FieldTypeDescription
startTimeDateTime!
endTimeDateTime!
generatedTimeDateTime!
instrumentedAgentCountIntDistinct accessible agents, not lifetime installations.
hasConfiguredAgentSourceBooleanWhether an accessible agent trace source is registered.
agentsWithOpenIssuesCountIntAgents with active, non-ignored reinforcement-loop issues seen in the past 48 hours, among the agents the user can check: those in domains where the user has alerts access. Issues served at HIDDEN priority are left out, as on the agent's issues page. Null when the user has no alerts access, when agents were observed but none is in a domain where the user has alerts access, or when the read fails.
agentOpenIssueCounts[AgentOpenIssueCount!]Every agent instrumentedAgentCount counts, with its count of open issues. A number means the agent was checked: 0 means it has none. A null count means the user lacks alerts access in the agent's domain. An agent missing from the list is not in instrumentedAgentCount. Ordered by count, highest first, with null counts last, then by agent name, then by traceTableMcon. Null when the user has no alerts access or the read fails.
agentsOnAlertedDataCountIntAgents reading known tables with currently unresolved alerts created during the window.
agentReadTableCountIntDistinct accessible tables with known direct agent dependencies. Lineage has no read-time filter.
unmonitoredAgentReadTableCountIntKnown agent-read tables without monitoring.
recentAlertsOnAgentReadTablesCountIntDistinct alerts created during the window on known agent-read tables, across all statuses and without declared severity.
agentsWithRecentAlertsOnReadTablesCountIntDistinct agents associated with recent alerts on known tables, across all alert statuses.
totalRunsBigInt
runSuccessRateFloatSuccessful run fraction from zero to one, when available.
p95LatencySecondsFloat
averageLatencySecondsFloatRun-weighted mean recorded trace duration in seconds, using the agent overview latency definition within [startTime, endTime). Includes successful and failed traces with finite, nonnegative durations. Null when no traces qualify or any source is unavailable.
totalTracesBigIntTraces starting in [startTime, endTime), using the agent overview totalTraces definition. Null when any source is unavailable or startTime is before retained span history.
errorCountBigIntTraces counted in totalTraces whose root span errored, using the agent overview errorCount definition. Null when totalTraces is null.
evalScoreFloat
spendFloatAlways null. Deprecated: Read getAgentSpend, which the client can poll..
spendUnitStringAlways null. Deprecated: Read getAgentSpend, which the client can poll..
unavailableFields[String!]!
AgentOpenIssueCount

Object type. One observed agent and how many open reinforcement-loop issues it has.

FieldTypeDescription
traceTableMconString!The agent's trace table mcon, as getAgentMetadataV2 reports it.
agentNameString!
openIssueCountIntDistinct open issues counted for this agent, by the rule agentsWithOpenIssuesCount uses. Null when the user lacks alerts access in the agent's domain, so its issues were not checked.

Related types

BigInt, DateTime, UUID

getAgentReadableIdentity (query)

getAgentReadableIdentity 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

The agent's identity, when the caller may open its pages. Null otherwise. Unlike the agents listing, this covers every agent.

Arguments

ArgumentTypeDescription
mconString!Trace-table or agent MCON
agentNameStringThe agent on that trace table. Optional with an agent MCON, which names one agent; when given, it must match that agent.

Returns

ReadableAgentIdentity

Example

query GetAgentReadableIdentity($mcon: String!) {
  getAgentReadableIdentity(mcon: $mcon) {
    agentMcon
    agentName
    displayName
    storageMcon
    sourceType
  }
}

Types used only by getAgentReadableIdentity

ReadableAgentIdentity

Object type. An agent the caller may open, with the MCONs its pages and monitors need.

FieldTypeDescription
agentMconString!MCON that identifies the agent
agentNameString!Name of the agent
displayNameString!Name to show for the agent
storageMconString!MCON of the trace table the agent records spans in
sourceTypeAgentSourceType!Source type

Related types

AgentSourceType

getAgentReadAccess (query)

getAgentReadAccess 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

Whether the caller may open this agent's pages. Without agentName, whether the caller reaches the trace table or any agent on it. Unlike the agents listing, this covers every agent.

Arguments

ArgumentTypeDescription
mconString!Trace-table or agent MCON
agentNameStringThe agent on that trace table

Returns

Boolean!

Example

query GetAgentReadAccess($mcon: String!) {
  getAgentReadAccess(mcon: $mcon)
}

getAgentSegments (query)

getAgentSegments 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 distinct segment values for the given field across all traces. Used to populate the segments dropdown in the Filter Widget.

Arguments

ArgumentTypeDescription
agentNameString!Agent name to filter by
traceTableMconString!MCON of the trace table or platform agent (aiagent object type) to query
segmentFieldTraceSegmentField!Field to get distinct segment values for (WORKFLOW, TASK, MODEL)

Returns

AgentSegmentsResult

Example

query GetAgentSegments($agentName: String!, $traceTableMcon: String!, $segmentField: TraceSegmentField!) {
  getAgentSegments(agentName: $agentName, traceTableMcon: $traceTableMcon, segmentField: $segmentField) {
    segments
  }
}

Types used only by getAgentSegments

AgentSegmentsResult

Object type. Result of getAgentSegments query.

FieldTypeDescription
segments[String!]!Distinct segment values for the requested field

Related types

TraceSegmentField

getAgentSpend (query)

getAgentSpend 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

What the visible agents' model calls cost in a half-open time window, in the customer's currency. Read separately from getAgentObservabilitySummary because it crosses to the customer's warehouse, so the other cards render first. A past window counts agents seen since its start, including agents first seen after it ended. Three error shapes are expected traffic rather than failures: a request carrying an idempotency id whose scan is still running answers REQUEST_IN_PROGRESS, which the client re-sends under the same id until the spend comes back; a request that ran out of time before the scan started answers REQUEST_TIMEOUT, which the client re-sends under the same id; and a request under an id whose earlier attempt failed answers a validation error carrying the IDEMPOTENT_REQUEST_FAILED code, on which the client must mint a fresh id for the same variables.

Arguments

ArgumentTypeDescription
startTimeDateTime!
endTimeDateTime!
domainUuidUUID

Returns

AgentSpend

Example

query GetAgentSpend($startTime: DateTime!, $endTime: DateTime!) {
  getAgentSpend(startTime: $startTime, endTime: $endTime) {
    spend
    spendUnit
  }
}

Types used only by getAgentSpend

AgentSpend

Object type.

FieldTypeDescription
spendFloatWhat the cohort's Cortex model calls cost over the window, in spendUnit. It excludes the warehouse cost of the agents' SQL. Null when the user lacks the graphql/query permission, the account lacks an agent or a compute cost rate, a priced agent's cost is in credits or another currency, no agent priced a model call, or the cohort has more Cortex agents than one batched cost read takes.
spendUnitStringThe lowercase ISO 4217 currency code spend is in, such as usd.

Related types

DateTime, UUID

getAgentsTraceOverview (query)

getAgentsTraceOverview 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 trace totals (count, average latency, tokens, errors) for several agents or workflow agents of one ClickHouse trace table in one read, for the agents list. A whole-agent entry is unfiltered, and a workflow-agent entry covers the traces that workflow agent owns. Returns one entry per distinct requested entry, in request order. A refused entry list is a VALIDATION_ERROR whose extensions._structured[0].code names the reason. TRACE_OVERVIEW_STATEMENT_TOO_LARGE means the names are too long for one request: send fewer entries.

Arguments

ArgumentTypeDescription
inputGetAgentsTraceOverviewInput!

Returns

[AgentTraceOverview!]!

Example

query GetAgentsTraceOverview($input: GetAgentsTraceOverviewInput!) {
  getAgentsTraceOverview(input: $input) {
    agentName
    workflowAgent
  }
}

Types used only by getAgentsTraceOverview

AgentListMetrics

Object type.

FieldTypeDescription
totalTracesInt!
avgLatencyFloat
totalTokensBigInt
errorCountInt!
AgentListMetricsWithComparison

Object type.

FieldTypeDescription
totalTracesInt!
avgLatencyFloat
totalTokensBigInt
errorCountInt!
prevPeriodAgentListMetrics
AgentTraceOverview

Object type.

FieldTypeDescription
agentNameString!
metricsAgentListMetricsWithComparisonNull when the caller cannot access this agent.
workflowAgentStringThe workflow agent this entry counts. Null for the whole agent.
AgentTraceOverviewEntryInput

Input object type. One entry of a batched trace overview.

FieldTypeDescription
agentNameString!Agent name
workflowAgentStringCount only this workflow agent's traces, as the workflowAgent trace filter does. Null counts the whole agent. Must not be blank, and at most 256 characters.
GetAgentsTraceOverviewInput

Input object type. Input parameters for GetAgentsTraceOverview query.

FieldTypeDescription
traceTableMconString!MCON of the ClickHouse trace table every agent is stored in
agentNames[String!]Whole agents to read, at most 25, each at most 256 characters. Send exactly one of agentNames and agents.
agents[AgentTraceOverviewEntryInput!]Agents or workflow agents to read: at most 25 distinct agent names, at most 201 distinct entries, and names whose query is at most 229376 bytes. One agent and 200 of its workflow agents fit at any length. Each agentName is at most 256 characters. A request over a limit is refused, not truncated. Send exactly one of agentNames and agents.
startTimeDateTime!Start of time range (inclusive)
endTimeDateTime!End of time range (inclusive)
includePreviousPeriodComparisonBooleanInclude the previous period of equal length (default: true) Default: true.

Related types

BigInt, DateTime

getAgentTraceTables (query)

getAgentTraceTables 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 all agent trace tables

Returns

[AgentTraceTable!]!

Example

query GetAgentTraceTables {
  getAgentTraceTables {
    createdTime
    updatedTime
    id
    uuid
    spanFormat
    recommendationsGeneratedAt
    supportsConversationEval
    supportsConversationClustering
    supportsTokenMetrics
  }
}

Related types

AgentTraceTable

getAvailablePlatformAgents (query)

getAvailablePlatformAgents 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 available agents in a warehouse by querying the platform directly

Arguments

ArgumentTypeDescription
connectionUuidUUIDSource connection to discover agents on.
connectionDataspaceStringSalesforce Data Cloud dataspace API name.
platformAgentTypePlatformAgentTypeSubtype to filter agents by. Omit to return every agent discoverable on the warehouse: the connection type fixes the platform family, so omitting the subtype lists all Databricks agents (both SDK and KA, tagged per-agent) for a Databricks warehouse — or all Snowflake agents for a Snowflake warehouse — in one call, never crossing platforms.
warehouseUuidUUID!Warehouse UUID to filter agents by

Returns

[AvailablePlatformAgentData!]!

Example

query GetAvailablePlatformAgents($warehouseUuid: UUID!) {
  getAvailablePlatformAgents(warehouseUuid: $warehouseUuid) {
    name
    databaseName
    schemaName
    platformAgentType
    displayName
    tablePrefix
    requiresManualTraceStorageSetup
    traceTableIngested
  }
}

Types used only by getAvailablePlatformAgents

AvailablePlatformAgentData

Object type.

FieldTypeDescription
nameString!
databaseNameString!
schemaNameString!
platformAgentTypePlatformAgentType!
displayNameString!Human-friendly label for the agent — the Databricks Agent Bricks tile name for Knowledge-Assistant agents, falling back to name for SDK and Snowflake agents (which have no tile). Always populated; never null, so clients can render it directly without a null check.
tablePrefixString
requiresManualTraceStorageSetupBoolean!
traceTableIngestedBoolean!Whether the agent's real trace table has been catalogued by metadata collection yet. A surfaced status only — registration is NOT blocked when False; the real-table anchor links on catalog ingest. Always true for Snowflake agents, which have no separate trace table.

Related types

PlatformAgentType, UUID

getConversationClustering (query)

getConversationClustering 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

Conversation-clustering panel for one (agent, scope) over the requested [startTime, endTime] window: enablement state, the space, per-cluster stats, eligible/classified coverage, and the requested aggregate metrics. Returns a result even before opt-in (state OPT_IN).

Arguments

ArgumentTypeDescription
inputGetConversationsFiltersDataInput!
scopeWorkflowStringNull = agent-wide taxonomy; a workflow selects that scope's taxonomy.
facetClusteringFacetWhich facet's panel to read; defaults to INTENT. Alias the field twice to read both facets in one query.
metrics[ClusterMetricInput!]Aggregates to compute per cluster, plus a baseline over the whole window. Omit it (or pass an empty list) to compute nothing — there is no default set, and metrics/baselineMetrics then come back empty. Duplicate pairs are collapsed.

Returns

ConversationClusteringResult

Example

query GetConversationClustering($input: GetConversationsFiltersDataInput!) {
  getConversationClustering(input: $input) {
    state
    eligibleConversationCount
    classifiedConversationCount
  }
}

Types used only by getConversationClustering

ClusterMetricInput

Input object type. One aggregate to compute: a field paired with how to aggregate it. Any combination is accepted.

FieldTypeDescription
fieldConversationMetricField!The field to aggregate.
aggregationConversationMetricAggregation!How to aggregate it.
ClusterShareDenominator

Enum type. The conversations a cluster's sharePct is a percentage of. ELIGIBLE_CONVERSATIONS counts every conversation in the window; Issue cards use it. CLASSIFIED_CONVERSATIONS counts conversations with a cluster assignment; Intent cards and Uncategorized use it. RATED_CONVERSATIONS counts conversations an end user rated; the Negative feedback card uses it, because it can never exceed feedback coverage.

ValueDescription
ELIGIBLE_CONVERSATIONS
CLASSIFIED_CONVERSATIONS
RATED_CONVERSATIONS
ConversationClusterMetric

Object type. One computed aggregate. Echoes the requested (field, aggregation) pair so a caller can match a cluster's entry against the matching baseline entry.

FieldTypeDescription
fieldConversationMetricField!
aggregationConversationMetricAggregation!
valueFloat!The raw aggregate value — deltas against the baseline are the caller's to compute. Seconds for the duration fields, a 0–1 fraction for AVG of HAS_ERRORS.
ConversationClusterStat

Object type. A cluster's windowed share of conversations (panel card).

FieldTypeDescription
clusterKeyString!Stable cluster slug.
nameString!Human-readable cluster name.
descriptionString!One-line summary of what belongs in this cluster.
ordinalInt!Position within the cluster's source group — custom (USER) and discovered (AUTO) clusters carry independent sequences, so values repeat across groups. The list order (custom first, then discovered, Uncategorized last) is authoritative; don't re-sort by this field alone.
sourceClusterSource!Where this cluster came from. USER marks a custom (user-defined) cluster — pinned before discovered clusters and stable across taxonomy refreshes.
conversationCountInt!Conversations assigned to this cluster in the window.
sharePctFloat!Percent of the shareDenominator conversations carrying this cluster's assignment. A conversation can carry more than one assignment, so cards can overlap and shares are not guaranteed to sum to 100.
shareDenominatorClusterShareDenominator!Which conversations sharePct is a percentage of.
shareDenominatorCountInt!The number of conversations sharePct divides by.
conditionFilterGroupThe cluster's criteria as a filter tree — the payload the ops-agent hand-off carries. For an eval-monitor- or percentile-derived cluster this may hold a marker-bearing FilterSql or literal rather than an executable predicate. Null on LLM-derived clusters.
ruleStringThe cluster's membership criteria rendered for display, e.g. "duration_seconds greater than 42.0" for a plain-threshold rule cluster. An eval-monitor-derived cluster renders the literal "[custom SQL condition]" instead of a readable rule, and a percentile-derived cluster renders its still-unresolved marker rather than the resolved threshold. Null on LLM-derived clusters.
metrics[ConversationClusterMetric!]!The requested aggregates for this cluster's conversations in the window. Empty when no metrics were requested, and when the cluster has no conversations in the window.
ConversationClusteringResult

Object type. Conversation-clustering panel for one (agent, scope, window): enablement state, the space, per-cluster stats, and coverage.

FieldTypeDescription
stateConversationClusteringState!Computed enablement state for the (agent, scope).
spaceConversationClusteringSpaceTypeThe clustering space; null before opt-in (state OPT_IN).
clusters[ConversationClusterStat!]!Per-cluster windowed stats incl. the synthetic Uncategorized bucket; empty until a taxonomy exists.
eligibleConversationCountInt!Conversations in the window eligible for classification. On an issue space, this is the M in "N of M conversations carry at least one issue."
classifiedConversationCountInt!Conversations in the window carrying a current-taxonomy cluster assignment. Classification runs on a schedule, so the most recently completed conversations are normally not classified yet and this trails eligibleConversationCount. On an issue space, rule evaluation writes no Uncategorized sentinel — a conversation matching no rule simply gets no assignment row — so this is exactly the N in "N of M conversations carry at least one issue."
baselineMetrics[ConversationClusterMetric!]!The same requested aggregates over every eligible conversation in the window, assigned or not — the comparison point for each cluster's metrics. Empty when no metrics were requested, before a taxonomy exists, or when the window held no conversations.
ConversationMetricAggregation

Enum type. How a field is aggregated over a cluster's conversations. MEDIAN and P95 are approximate on ClickHouse-backed spaces — quantile samples past ~8k conversations per group, so values can shift slightly between identical reads.

ValueDescription
MEDIAN
P95
AVG
ConversationMetricField

Enum type. A conversation-grain field a cluster aggregate is computed over. ACTIVE_DURATION_SECONDS is execution duration (per-turn processing time summed); DURATION_SECONDS is elapsed wall-clock duration; TOTAL_TOKENS is the platform-native token cost — not comparable across platforms, and 0 on platforms that report no token counts (check the agent's supportsTokenMetrics); TURN_COUNT is the conversation's turns; HAS_ERRORS is 1 when the conversation had errors and 0 otherwise, so its AVG is the error rate.

ValueDescription
ACTIVE_DURATION_SECONDS
DURATION_SECONDS
TOTAL_TOKENS
TURN_COUNT
HAS_ERRORS

Related types

ClusterSource, ClusteringFacet, ConversationClusteringSpaceType, ConversationClusteringState, FilterGroup, GetConversationsFiltersDataInput

getConversationClusteringSettings (query)

getConversationClusteringSettings 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

Account-level conversation clustering settings.

Returns

ConversationClusteringSettings!

Example

query GetConversationClusteringSettings {
  getConversationClusteringSettings {
    snowflakeModelId
  }
}

Related types

ConversationClusteringSettings

getConversationClusteringSpaces (query)

getConversationClusteringSpaces 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

List conversation-clustering spaces for one facet of an agent + trace table, each with its current-version taxonomy clusters.

Arguments

ArgumentTypeDescription
agentNameString!
traceTableMconString!
facetClusteringFacetWhich facet's spaces to list; defaults to INTENT. Alias the field twice to read both facets in one query.
beforeString
afterString
firstInt
lastInt

Returns

ConversationClusteringSpaceConnection

Example

query GetConversationClusteringSpaces($agentName: String!, $traceTableMcon: String!) {
  getConversationClusteringSpaces(agentName: $agentName, traceTableMcon: $traceTableMcon) {
    totalCount
  }
}

Types used only by getConversationClusteringSpaces

ConversationClusteringSpaceConnection

Object type.

FieldTypeDescription
pageInfoPageInfo!Pagination data for this connection.
edges[ConversationClusteringSpaceEdge]!Contains the nodes in this connection.
totalCountInt!Total spaces for the (agent, table).
ConversationClusteringSpaceEdge

Object type. A Relay edge containing a ConversationClusteringSpace and its cursor.

FieldTypeDescription
nodeConversationClusteringSpaceTypeThe item at the end of the edge
cursorString!A cursor for use in pagination

Related types

ClusteringFacet, ConversationClusteringSpaceType, PageInfo

getConversationEval (query)

getConversationEval 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

Score a conversation across one or more rating dimensions (task completion, answer relevance, helpfulness, clarity, prompt adherence, language match, or a caller-supplied custom dimension). Each dimension returns an integer 1-5 score plus a short reasoning string. Results are ephemeral — every call regenerates.

Arguments

ArgumentTypeDescription
inputGetConversationEvalInput!

Returns

ConversationEvalResult

Example

query GetConversationEval($input: GetConversationEvalInput!) {
  getConversationEval(input: $input) {
    conversationId
    modelId
  }
}

Types used only by getConversationEval

ConversationEvalCustomDimensionInput

Input object type. Caller-supplied custom rubric for an inline eval dimension.

FieldTypeDescription
nameString!Display label for the custom dimension; echoed back on the result.
criteriaString!Free-text rubric the judge will score on. Interpolated into a fixed 1-5 scoring scaffold; the underlying prompt is not exposed in the response.
ConversationEvalDimension

Object type. One dimension's outcome. Either (score + reasoning) or error is set.

FieldTypeDescription
templateNameStringName of the built-in dimension scored, or null when the dimension is custom.
customNameStringCaller-supplied display label, or null when the dimension is built-in.
scoreIntInteger score 1-5; null when error is set.
reasoningStringShort explanation for the score; null when error is set.
errorConversationEvalDimensionErrorFailure detail for this dimension; null on success.
ConversationEvalDimensionError

Object type.

FieldTypeDescription
kindString!Failure category for this dimension.
messageString!Human-readable failure detail.
ConversationEvalDimensionInput

Input object type. One requested dimension on getConversationEval.

Exactly one of templateName or custom must be set. Caller-input
mistakes (unknown template, both/neither set, oversize custom criteria)
abort the entire request via a top-level GraphQL error. Per-dimension
error fields in the result are reserved for execution failures
(warehouse evaluation timeout, malformed model response).

FieldTypeDescription
templateNameStringName of a built-in conversation-eval dimension to score against (e.g. task_completion_conversation, helpfulness_conversation).
customConversationEvalCustomDimensionInputInline custom criteria. Mutually exclusive with templateName.
ConversationEvalResult

Object type. Result of getConversationEval: one row per requested dimension.

FieldTypeDescription
conversationIdString!Conversation id evaluated
modelIdString!Model id used for the evaluations
evalDimensions[ConversationEvalDimension!]!One entry per requested eval dimension, in request order.
GetConversationEvalInput

Input object type. Input for getConversationEval query.

FieldTypeDescription
agentNameString!Agent name
traceTableMconString!MCON of the trace table or platform agent
conversationIdString!Conversation id to score
startTimeDateTime!Start of time range (inclusive)
endTimeDateTime!End of time range (inclusive)
evalDimensions[ConversationEvalDimensionInput!]!One to 7 eval dimensions to apply. Results are returned in the same order as the requested dimensions.

Related types

DateTime

getConversationExplanation (query)

getConversationExplanation 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

Generate an AI explanation of a full conversation across all its turns. Each call regenerates — explanations are not persisted.

Arguments

ArgumentTypeDescription
inputGetConversationExplanationInput!

Returns

ConversationExplanationResult

Example

query GetConversationExplanation($input: GetConversationExplanationInput!) {
  getConversationExplanation(input: $input) {
    conversationId
    summary
    modelId
  }
}

Types used only by getConversationExplanation

ConversationExplanationResult

Object type. Result of getConversationExplanation: an AI-authored summary of one conversation.

FieldTypeDescription
conversationIdString!Conversation id
summaryString!Explanation of the conversation — a single comprehensive markdown paragraph covering what the user was trying to accomplish, the steps the agent took across turns, errors encountered, slow calls, and the outcome. Identifiers are wrapped in inline code; the paragraph does not use headings, fenced code blocks, or lists.
modelIdString!Identifier of the LLM that produced this explanation
GetConversationExplanationInput

Input object type. Input for getConversationExplanation query.

FieldTypeDescription
agentNameString!Agent name
traceTableMconString!MCON of the trace table or platform agent
conversationIdString!Conversation id to explain
startTimeDateTime!Start of time range (inclusive)
endTimeDateTime!End of time range (inclusive)

Related types

DateTime

getConversationMessageContentV2 (query)

getConversationMessageContentV2 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 a single chunk of full message content for a cached conversation-thread V2 snapshot.

Arguments

ArgumentTypeDescription
inputGetConversationMessageContentV2Input!

Returns

ConversationMessageContentChunkV2

Example

query GetConversationMessageContentV2($input: GetConversationMessageContentV2Input!) {
  getConversationMessageContentV2(input: $input) {
    messageId
    chunkIndex
    chunkCount
    content
    hasMore
  }
}

Types used only by getConversationMessageContentV2

ConversationMessageContentChunkV2

Object type. A chunk of full message content from a cached conversation snapshot.

FieldTypeDescription
messageIdString!Opaque message ID
chunkIndexInt!Zero-based chunk index
chunkCountInt!Total number of chunks
contentString!Chunk content
hasMoreBoolean!Whether another chunk is available
GetConversationMessageContentV2Input

Input object type. Input for getConversationMessageContentV2 query.

FieldTypeDescription
snapshotIdString!Snapshot ID from getConversationThreadV2
messageIdString!Opaque message ID from the thread summary
chunkIndexInt!Zero-based chunk index to fetch

getConversationOverview (query)

getConversationOverview 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

Conversation counts, durations, root errors, and turn tokens over matching traces in a window with an exclusive end. Conversations need at least one trace with messages or tool calls. totalConversations equals getTraceOverview.totalConversations for the same input. Filters select turns before conversation grouping. Comparison includes the preceding window of equal length.

Arguments

ArgumentTypeDescription
inputGetConversationOverviewInput!Conversation window and filters

Returns

ConversationOverviewMetricsWithComparison!

Example

query GetConversationOverview($input: GetConversationOverviewInput!) {
  getConversationOverview(input: $input) {
    totalConversations
    erroredConversations
    errorRate
    avgDurationSeconds
    p95DurationSeconds
    totalTokens
    avgTokensPerConversation
  }
}

Types used only by getConversationOverview

ConversationOverviewMetrics

Object type.

FieldTypeDescription
totalConversationsInt!Conversations with messages or tool calls from traces matching the filters and time range. The end time is excluded. Equals getTraceOverview.totalConversations for the same input.
erroredConversationsInt!Conversations with an errored root span in at least one matching turn in the window. Child-span errors alone do not count.
errorRateFloatErrored conversations as a percentage (0-100) of all conversations. Null when there are no conversations.
avgDurationSecondsFloatMean wall-clock duration in seconds, from the first turn start to the last turn end within the window. Idle time between turns counts.
p95DurationSecondsFloat95th percentile of seconds from first turn start to last turn end within the window, including idle time between turns.
totalTokensBigIntSum of turn token counts. Null on platforms without token counts and when no conversation has token data. Zero means zero tokens.
avgTokensPerConversationFloatMean summed turn tokens per conversation with token data. Null on platforms without token counts and when no conversation has token data. Zero means zero tokens.
ConversationOverviewMetricsWithComparison

Object type.

FieldTypeDescription
totalConversationsInt!Conversations with messages or tool calls from traces matching the filters and time range. The end time is excluded. Equals getTraceOverview.totalConversations for the same input.
erroredConversationsInt!Conversations with an errored root span in at least one matching turn in the window. Child-span errors alone do not count.
errorRateFloatErrored conversations as a percentage (0-100) of all conversations. Null when there are no conversations.
avgDurationSecondsFloatMean wall-clock duration in seconds, from the first turn start to the last turn end within the window. Idle time between turns counts.
p95DurationSecondsFloat95th percentile of seconds from first turn start to last turn end within the window, including idle time between turns.
totalTokensBigIntSum of turn token counts. Null on platforms without token counts and when no conversation has token data. Zero means zero tokens.
avgTokensPerConversationFloatMean summed turn tokens per conversation with token data. Null on platforms without token counts and when no conversation has token data. Zero means zero tokens.
prevPeriodConversationOverviewMetricsThe same metrics for the preceding period of equal length. Null when comparison is disabled; never null when it is enabled.
GetConversationOverviewInput

Input object type. Conversation metrics over traces selected before grouping into conversations.

FieldTypeDescription
agentNameString!Agent name to filter by
traceTableMconString!MCON of the trace table or platform agent to query
startTimeDateTime!Start of the window, inclusive
endTimeDateTime!End of the window, exclusive
includePreviousPeriodComparisonBooleanTrue, null, or omitted includes the preceding window of equal length. prevPeriod is always present when comparison is on. False disables comparison. Default: true.
filtersTraceFiltersInputSelect traces before grouping into conversations. Metrics use only matching turns.
segmentFilterTraceSegmentFilterInputRestrict traces by MODEL, WORKFLOW, or TASK before grouping into conversations. Metrics use only matching turns. Omitted or null selects all traces.

Related types

BigInt, DateTime, TraceFiltersInput, TraceSegmentFilterInput

Source: The GraphQL API reference

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