Agent traces, part 5 of 7 (GraphQL)

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

Queries

getReinforcementLoopV2Issues (query)

getReinforcementLoopV2Issues 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

Issues the reinforcement loop diagnosed for one agent, each with the conversations it was found in: one node per issue with its current title, description and recommendation, its computed priority and rank, and one entry per conversation carrying the cited turns and the rendering of how the issue shows up there. Sorted by orderBy, rank, then priority, then conversationCount by default; forward-paginated.

Arguments

ArgumentTypeDescription
agentNameStringObservability agent name. Required unless issueUuid is given, in which case it is read from the issue.
traceTableMconStringMCON of the agent's trace table — same value passed as traceTableMcon on getAgentGraph. Disambiguates agents with identical names across trace tables. Required unless issueUuid is given, in which case it is read from the issue.
workflowNameStringNarrow to issues diagnosed in this workflow; their conversations and conversationCount narrow with it. Omit to span every workflow. An empty string is a distinct, explicitly empty-named workflow. To narrow to conversations with no workflow, pass workflowScope: NO_WORKFLOW — that scope has no name to give here.
workflowScopeReinforcementLoopWorkflowScopeWhich workflow scope to read. Omit for the default: a workflowName narrows to that workflow, its absence spans every workflow. NO_WORKFLOW narrows to conversations whose workflow is null and must be sent without a workflowName; NAMED requires one.
priorities[AgentHealthPriority!]Keep issues whose served priority is one of these. Omit or pass an empty list to span every priority. HIDDEN requires includeHidden.
includeHiddenBooleanAlso return issues served priority HIDDEN. False by default: hidden issues are left out of the nodes, the counts and emptyReason. Default: false.
topRankedOnlyBooleanTrue keeps each Issue space's top 10, the issues with a rank. False or null keeps every issue. Default: false.
issueUuidUUIDNarrow to one issue by its issueUuid. ANDs with the other filters — a mismatch returns empty, not an error.
issueSpaceUuidUUIDNarrow to one of the agent's Issue spaces, by the issueSpaceUuid its issues carry. ANDs with the other filters. A space that is not this agent's matches no issue. Ranks are per Issue space, so narrowing does not change them.
startTimeDateTimeKeep issues with lastSeenAt at or after this instant. Omit for no lower bound. Filters issues by report time. conversations and conversationCount are not restricted to the window; conversationCountInWindow, conversationCountSeries, impactScore and rank are, by conversation time; impactScore and rank read at most its last 90 days. priority is not.
endTimeDateTimeKeep issues with lastSeenAt at or before this instant. Omit for no upper bound. Must not precede startTime.
dispositionReinforcementLoopIssueDispositionKeep issues with this disposition: NONE for open issues, IGNORED for ignored ones. Omit to span both.
status[ReinforcementLoopIssueStatus!]Keep issues with one of these statuses. Omit, null or empty for all.
modeReinforcementLoopRunModeLIVE issues by default; BACKTEST reads what backtest runs reported.
orderBy[ReinforcementLoopV2IssueOrder!]Sort keys, applied in order. [RANK, PRIORITY, CONVERSATION_COUNT] by default or when null. Ties left after the listed keys fall to lastSeenAt, newest first. A key may appear once.
firstIntPage size, 1..500. Default: 100.
afterStringOpaque forward-pagination cursor — the previous page's endCursor. Omit for the first page.
conversationsFirstIntConversations served per issue, newest first, 1..100. conversationCount reports the total. Default: 1.
conversationSeriesReinforcementLoopV2ConversationSeriesInputAdds conversationCountSeries to each issue, over [startTime, endTime). Requires both, with at most 366 buckets. Does not change which issues are listed or their order.

Returns

ReinforcementLoopV2IssueConnection!

Example

query GetReinforcementLoopV2Issues {
  getReinforcementLoopV2Issues {
    emptyReason
    viewerIsStaff
  }
}

Types used only by getReinforcementLoopV2Issues

ReinforcementLoopConfigAccess

Enum type. What an RL V2 issue's text was written from. FULL read the agent's configuration as well as its traces. TRACES_ONLY read the traces alone, so the issue states the failure with no cause or fix.

ValueDescription
FULL
TRACES_ONLY
ReinforcementLoopConversationImpact

Object type. How bad one conversation was, as the issue's newest report of it scores it.

FieldTypeDescription
scoreFloat!0 to 1: one minus the product of (1 - entry) over the counted entries. The issue's impactScore adds up the scores of its conversations in the window.
inWindowBoolean!Whether its score counts toward the issue's impactScore: it happened in [startTime, endTime), at most its last 90 days, or in the last 14 days without either bound, within the list's workflow filter.
entries[ReinforcementLoopImpactEntry!]!CORRECTNESS first, then each cluster the report says the issue explains. The cluster entries are empty when cluster content access is denied.
ReinforcementLoopDraftPrRef

Object type. The newest draft-PR workflow dispatch for an issue, list-grade.

Enough to render an icon state (pending / opened / failed) and a
click-through; the issue's full dispatch history stays on
getGithubActionTriggerDispatches.

FieldTypeDescription
statusGithubActionTriggerDispatchStatus!Dispatch lifecycle: DISPATCHED/RUNNING = pending, SUCCEEDED = draft PR opened, FAILED/EXPIRED = no PR produced.
prUrlStringWeb URL of the draft PR — set once the workflow reports it (SUCCEEDED).
prNumberIntPR number, set together with prUrl.
prStateGithubActionTriggerDispatchPrStateThe PR's state, from the GitHub webhook or the dispatch poller. Null until the poller links the PR. The draft PR counts as work while the dispatch is DISPATCHED or RUNNING, or while this is OPEN.
ghRunUrlStringGitHub Actions run URL — the click-through while the workflow is running.
dispatchedAtDateTime!When the workflow dispatch was triggered.
completedTimeDateTimeWhen the dispatch reached a terminal status; null while pending.
ReinforcementLoopImpactEntry

Object type. One signal of how bad a conversation was: its value times its weight.

FieldTypeDescription
kindReinforcementLoopImpactEntryKind!
clusterKeyStringThe cluster the issue explains in this conversation. Null for CORRECTNESS.
valueFloat!How strongly the conversation shows the signal, 0 to 1. CORRECTNESS: wrong_answer 1, unsupported_answer 0.8, partial_answer 0.5, no_answer 0.5, out_of_reach 0.
weightFloat!How much the signal counts: 1, 0.5 or 0.2, fixed by Monte Carlo. 0 for a cluster the loop no longer diagnoses.
entryFloat!weight times value.
countedBoolean!False for every COST entry of the conversation but its highest. The cost clusters measure the same lost time, so only the highest counts, and the first of equal entries.
ReinforcementLoopImpactEntryKind

Enum type. What an entry of a conversation's impact measures. CORRECTNESS: how the answer failed the user. YES_NO: a cluster the conversation is in. EVAL: an eval monitor the conversation failed. COST: time or tokens the issue cost.

ValueDescription
CORRECTNESS
YES_NO
EVAL
COST
ReinforcementLoopIssueDisposition

Enum type. What a user decided about an issue. IGNORED issues are left out of the digest.

ValueDescription
NONE
IGNORED
ReinforcementLoopIssueFeedback

Object type. The current feedback on an RL V2 issue. Customers don't see Monte Carlo staff feedback.

FieldTypeDescription
entries[ReinforcementLoopIssueFeedbackEntry!]!Each person's current feedback, newest first. Conversation-level entries carry conversationId. Monte Carlo staff feedback is left out for customers.
upCountInt!UP ratings among the issue-level entries. Conversation-level entries aren't counted.
downCountInt!DOWN ratings among the issue-level entries. Conversation-level entries aren't counted.
history[ReinforcementLoopIssueFeedbackEntry!]!Every feedback row on the issue, newest first, including UNDO rows and ratings a newer one replaced. Same staff visibility as entries. Read only when selected.
ReinforcementLoopIssueFeedbackEntry

Object type. One feedback row on an RL V2 issue, or on one of its conversations.

FieldTypeDescription
feedbackUuidUUID!
issueReportUuidUUID!The report the person rated. Compare with the node's issueReportUuid to tell whether the issue changed since.
userUserBasicInfoThe person who left the feedback. Null once that user is deleted.
userEmailStringDisplay label for the person who left the feedback. Returns the user's email for human users; for agent users, returns a derived display label (e.g. Bayes on <domain>) — never the agent's internal address. Null once that user is deleted. Deprecated: Read user.email..
isMineBoolean!Left by the caller.
isStaffBoolean!Left by Monte Carlo staff. Only staff see these entries.
ratingReinforcementLoopFeedbackRating!
reasonReinforcementLoopFeedbackReason
commentString!
conversationIdStringThe conversation the feedback is about; null for feedback on the issue.
shownPriorityAgentHealthPriorityThe priority the person saw.
duplicateOfIssueUuidUUIDThe issue this one duplicates, for reason DUPLICATE.
suggestedPriorityAgentHealthPriorityThe priority the person suggests, for WRONG_PRIORITY.
priorityReasonReinforcementLoopFeedbackPriorityReason
fixPrUrlStringThe pull request that fixed it, for FIX_WORKED.
createdTimeDateTime!
ReinforcementLoopIssueFix

Object type. One change that fixed an RL V2 issue.

FieldTypeDescription
changeIdString!An opaque key. Show ref and changedAt instead.
kindString!pull_request, cortex_agent_spec or cortex_object. New kinds may be added.
refString!A pull request's URL, or the agent's or object's name.
changedAtDateTimeWhen the change went live. Null when its history could not date it.
matchString!How the change compares with the recommendation: same, partial or different.
reasonStringThe changed lines that remove a cause. Null when agent content access is denied.
missingStringWhat the recommendation asked for that the change left out. Null when nothing was, or when agent content access is denied.
ReinforcementLoopIssueFixSource

Enum type. The system behind an RL V2 issue's fix or work. MANUAL = a user marked it fixed or in progress. RL_PR = its draft PR. LINEAR, JIRA and SERVICENOW = its ticket in that system. A fix is recorded when the PR merges or the ticket is done.

ValueDescription
MANUAL
RL_PR
LINEAR
JIRA
SERVICENOW
ReinforcementLoopIssueOutcome

Object type. What an RL outcomes run found about whether a change fixed the issue.

FieldTypeDescription
statusReinforcementLoopOutcomeStatus!
statusReasonString!Why the issue has its status, as a code such as fixed_by_change or no_change_in_window. New codes may be added.
statusEvidenceStringWhy the issue has its status, as a sentence. Null when agent content access is denied.
windowStartDateTime!Start of the window checked.
windowEndDateTime!End of the window checked. Equals fixedAt for a run started by a fix.
reportedAtDateTime!When the report was stored.
fixedBy[ReinforcementLoopIssueFix!]!The changes that fixed the issue, oldest first. Empty unless FIXED.
ReinforcementLoopIssueStatusCause

Enum type. What changed an RL V2 issue's status, or what happened to it.

  • User actions: MARK_FIXED, MARK_IN_PROGRESS, UNDO, TICKET_CREATED, TICKET_LINKED,
    PR_DISPATCHED, IGNORED, UNIGNORED.
  • Draft PR events: PR_OPENED, PR_CLOSED (closed without a merge), DISPATCH_FAILED (the
    workflow failed or never finished).
  • A ticket or PR webhook or poller, such as LINEAR_WEBHOOK or GITHUB_WEBHOOK.
  • The regression watch (REGRESSED), and a dismissed or restored conversation.
ValueDescription
MARK_FIXED
MARK_IN_PROGRESS
UNDO
TICKET_CREATED
TICKET_LINKED
PR_DISPATCHED
PR_LINKED
DISPATCH_POLLER
LINEAR_WEBHOOK
JIRA_WEBHOOK
SERVICENOW_WEBHOOK
GITHUB_WEBHOOK
REGRESSED
MATCH_DISMISSED
MATCH_RESTORED
BACKFILL
IGNORED
UNIGNORED
PR_OPENED
PR_CLOSED
DISPATCH_FAILED
ReinforcementLoopIssueStatusChange

Object type. One entry of an RL V2 issue's status history: a status change or an event, such as a
user action or a draft PR closing. An event can leave the status as it was, and then
fromStatus equals toStatus. Label an entry by its cause.

FieldTypeDescription
changeUuidUUID!
createdTimeDateTime!When the change or event happened.
fromStatusReinforcementLoopIssueStatus!
toStatusReinforcementLoopIssueStatus!
causeReinforcementLoopIssueStatusCause!
userUserBasicInfoThe person who acted. Null when no person did, such as a webhook without a matching user or the regression watch, and once that user is deleted.
isMineBoolean!Made by the caller.
linkUrlStringThe ticket, PR or pasted link behind the entry. An event links its own ticket or PR. A change to OPEN links only a Linear ticket or ServiceNow incident that closed without being done and so moved the issue. Null when the work has no link, such as a user action without a pasted link or a draft PR still running.
linkLabelStringThe ticket key or PR number of linkUrl, such as AI-2098 or #3051.
linkSourceReinforcementLoopIssueFixSourceThe system behind linkUrl. Null when linkUrl is. MANUAL is a link a user pasted. RL_PR is the issue's draft PR.
conversationCountIntOn a regression, the conversations counted against the fix.
undoneActionReinforcementLoopIssueUndoActionOn an UNDO change, the user action it reverted.
ReinforcementLoopIssueUndoAction

Enum type. The user action that undoReinforcementLoopIssueStatus reverts.

ValueDescription
MARK_FIXED
MARK_IN_PROGRESS
ReinforcementLoopOutcomeStatus

Enum type. Whether an RL outcomes run found that a change fixed the issue.

ValueDescription
FIXED
NOT_FIXED
UNKNOWN
ReinforcementLoopRunMode

Enum type. Whether a reinforcement-loop run or issue is live work or a backtest.

ValueDescription
LIVE
BACKTEST
ReinforcementLoopTraceRef

Object type. One turn a reinforcement-loop issue cites in a conversation.

FieldTypeDescription
traceIdString!Trace id of the cited turn.
turnIndexInt!Zero-based index of the cited turn within the conversation — matches the conversation API's turnIndex.
traceStartTimeDateTimeStart bound for looking up this turn's trace — pass to getTraceTreeNodes' traceStartTime. Span event time (the trace's earliest span timestamp, padded by 5 minutes), resolved from the trace store at read time. Null when the trace can no longer be found.
traceEndTimeDateTimeEnd bound for looking up this turn's trace — pass to getTraceTreeNodes' traceEndTime. Span event time (the trace's latest span timestamp, padded by 5 minutes), resolved from the trace store at read time. Null when the trace can no longer be found.
ReinforcementLoopV2ConversationBucket

Object type. Distinct diagnosed conversations of an issue in one bucket, by conversation time.

FieldTypeDescription
bucketStartDateTime!Midnight starting the bucket's day, with the series timeZone's offset.
conversationCountInt!
ReinforcementLoopV2ConversationBucketSize

Enum type. Bucket width of an RL V2 conversation series. DAY = one calendar day in the series'
timeZone.

ValueDescription
DAY
ReinforcementLoopV2ConversationCountSeries

Object type. An issue's conversations per bucket of the list's [startTime, endTime) window.

FieldTypeDescription
completeThroughDateTimeDiagnosis has reached every conversation before this time; counts after it can still grow. It is an estimate: a conversation whose traces arrive late can still be added before it. Null for backtest issues, and when clustering or diagnosis has not started on the issue's Issue space.
buckets[ReinforcementLoopV2ConversationBucket!]!One bucket per day of the window in the series timeZone, oldest first, zero-filled. The first and last can be partial days. A day across a daylight saving change is 23 or 25 hours long. They add up to conversationCountInWindow.
ReinforcementLoopV2ConversationSeriesInput

Input object type. How to split each issue's conversations in the list's window.

FieldTypeDescription
bucketSizeReinforcementLoopV2ConversationBucketSize!
timeZoneStringThe IANA time zone whose calendar days the buckets follow, such as America/Chicago. Defaults to UTC. An unknown name fails the request.
ReinforcementLoopV2DiagnosisCluster

Object type. An Issue cluster as the diagnosis run recorded it when the trigger fired.

A snapshot from the run's manifest. Name and description are the cluster's
at diagnosis time and survive a later rename or deletion.

FieldTypeDescription
clusterUuidUUID!The cluster's id at diagnosis time.
clusterKeyString!The cluster's key within its Issue space.
nameString!The cluster's name at diagnosis time.
descriptionString!The cluster's description at diagnosis time.
conversationCountIntDistinct conversations of the issue that matched this cluster, or on responsibleClusters, whose report named it responsible. Counted within the same workflow filter as the issue's conversationCount. Null on a conversation's clusters.
ReinforcementLoopV2EmptyReason

Enum type. Why getReinforcementLoopV2Issues returned no nodes.

NO_ISSUE_SPACE = the agent has no Issue space; NO_ISSUES = the
account has no issue of the requested mode for this agent, before any
filter; NO_MATCHES = issues exist but none match the filters.

ValueDescription
NO_ISSUE_SPACE
NO_ISSUES
NO_MATCHES
ReinforcementLoopV2Issue

Object type. One RL V2 issue: cross-conversation identity plus its conversations.

FieldTypeDescription
issueUuidUUID!The issue's public id — the handle the ticket and draft-PR mutations resolve, the issueUuid argument for a targeted re-fetch, and the issue_id the agent passes when it reports the issue again.
issueSpaceUuidUUIDThe Issue space the issue belongs to; null once the space is deleted.
agentNameString!
traceTableMconString!
modeReinforcementLoopRunMode!Live issues and backtest issues never mix.
titleString!Current title: the newest report's. A placeholder when the caller cannot read agent content.
descriptionStringCurrent description: the newest report's. Null when content is restricted.
recommendationStringCurrent recommendation: the newest report's. May be empty on a TRACES_ONLY issue. Null when content is restricted.
configAccessReinforcementLoopConfigAccess!What the newest report's text was written from. FULL on an issue with no report. Not subject to redaction.
isDataIssueBoolean!True when the newest report says the agent acted reasonably but the data it got back was bad. False on an issue with no report. Not subject to redaction.
priorityAgentHealthPriorityImpact bucket of impactScore, computed at read time: HIGH at 3 or more, MEDIUM at 1.5 or more, LOW above 0. An issue scoring 0 is LOW when a conversation of it ever had a wrong, unsupported, partial or missing answer, or when it has 3 or more conversations in the last 14 days, and HIDDEN otherwise. It always bands the score of the last 14 days, which is impactScore only when the list has neither startTime nor endTime. Null for an issue with no reports. Not subject to redaction.
impactScoreFloatThe Issue Impact Score: the sum of the impact scores of the issue's conversations in [startTime, endTime), by conversation time, at most the last 90 days of it, or in the last 14 days when the list has neither bound or is a backtest list. priority does not follow the range. Measured in bad conversations: 3 is about three conversations that went fully wrong, or six that went half wrong. Each conversation's impact shows its entries. Null for an issue with no reports. Not subject to redaction.
rankIntThe issue's place in its Issue space's top 10, 1 first. Null outside the top 10. An agent has an Issue space per workflow, or one for the whole agent. Issues rank by priority, then impactScore, then conversations counted in impactScore, then the worst of them, then the newest report. Ignored and HIDDEN issues are not ranked. A workflowName filter ranks on that workflow's reports. startTime and endTime rank the issues the list keeps that had a conversation between them, on their impactScore over that time. No other filter changes the rank.
isNewToTopBoolean!In its Issue space's top 10 now, and not 7 days ago. With startTime or endTime, the earlier top ranks the same range moved 7 days back.
reportedPriorityAgentHealthPriorityThe highest priority the agent has reported for the issue. Never HIDDEN. Not subject to redaction. Deprecated: priority no longer reads it. Null once the agent stops reporting one..
groupingMetadataGenericScalarFor the reinforcement-loop agent only; the UI never shows it. The free-form object the grouping agent saved with the newest report, read back so later runs reuse its grouping decisions. Null when the newest report carried none and when content is restricted.
firstDetectedAtDateTime!The time of the issue's earliest conversation.
lastSeenAtDateTime!The time of the issue's newest conversation; the sort key, newest first.
conversationCountInt!Distinct conversations the issue was diagnosed in, in total; not clamped to conversationsFirst.
conversationCountInWindowIntDistinct conversations the issue was diagnosed in whose conversation time is in [startTime, endTime). Conversation time is the start of the conversation's latest turn. A missing bound is open. The workflow filter applies. Only diagnosed conversations count, and conversations reported before this field existed have no conversation time. Null when the list has neither bound.
conversationCountSeriesReinforcementLoopV2ConversationCountSeriesconversationCountInWindow per bucket. Null unless conversationSeries is set.
conversations[ReinforcementLoopV2IssueConversation!]!The newest conversationsFirst conversations, one entry each, newest report first.
diagnosisClustersWithheldReasonRawContentWithheldReasonWhy diagnosisClusters and responsibleClusters were withheld, or null when they were not.
diagnosisClusters[ReinforcementLoopV2DiagnosisCluster!]!The Issue clusters the issue's conversations matched. Aggregated over all conversations, not only the served slice. Sorted by conversationCount descending, then name, then clusterKey. Name and description come from the newest run that matched the cluster. Empty when cluster content access is denied.
responsibleClusters[ReinforcementLoopV2DiagnosisCluster!]!The Issue clusters the agent named as responsible for this issue, across all conversations. A conversation counts through its newest report; reports sent before the agent named clusters add none. Sorted and named like diagnosisClusters. Empty when cluster content access is denied.
linearTicketAgentHealthIssueLinearTicketLinear ticket linked to this issue (at most one); null when none.
jiraTicketAgentHealthIssueJiraTicketJira ticket linked to this issue (at most one); null when none.
serviceNowTicketAgentHealthIssueServiceNowTicketServiceNow incident linked to this issue (at most one); null when none.
draftPrReinforcementLoopDraftPrRefThe newest draft-PR workflow dispatch for this issue; null when never dispatched.
issueReportUuidUUIDThe report record the title, description and recommendation come from. Send it back as issueReportUuid when leaving feedback. Null on an issue with no report.
feedbackReinforcementLoopIssueFeedback!
outcomeReinforcementLoopIssueOutcomeWhat the newest RL outcomes run found: the run started by the issue's fix, or a daily run that found it fixed. Null when there is none.
dispositionReinforcementLoopIssueDisposition!IGNORED once a user ignored the issue. Ignored issues still list here.
dispositionReasonReinforcementLoopIssueDispositionReasonWhy the issue was ignored; null unless IGNORED.
dispositionCommentStringThe comment left when the issue was ignored.
statusReinforcementLoopIssueStatus!Where the issue stands: OPEN, IN_PROGRESS or FIXED.
fixedAtDateTimeWhen the last fix was recorded. It stays set after the issue regressed or a user reopened the work.
fixSourceReinforcementLoopIssueFixSourceWhat recorded the last fix.
fixLinkUrlStringLink to the last fix, such as the merged PR or the completed ticket.
regressedAtDateTimeWhen the issue came back after its last fix. Null while the fix holds.
inProgressAtDateTimeWhen a user last marked the issue in progress. It stays set after a fix, like inProgressLinkUrl. The flag counts as work only when it is after fixedAt, or when there is no fix.
inProgressLinkUrlStringThe link a user gave when marking the issue in progress.
statusHistory[ReinforcementLoopIssueStatusChange!]!Status changes, and user actions and ticket or PR events that left the status as it was, newest first. History starts when status history shipped. Read only when selected.
undoActionReinforcementLoopIssueUndoActionThe user's last Mark fixed or Mark in progress, while undoReinforcementLoopIssueStatus can still revert it. Null when there is nothing to undo: after an undo, or once a later fix, ticket, draft PR or regression cleared it.
regressionConversations[ReinforcementLoopV2IssueConversation!]!The newest conversationsFirst conversations that count against the last fix: those that started 24 hours or more after it, less the dismissed ones. Newest conversation first. Empty without a fix. Not narrowed by the workflow filter.
regressionConversationCountIntHow many conversations count against the last fix. Two or more regress a Fixed issue. Null without a fix.
dismissedConversations[ReinforcementLoopV2IssueConversation!]!The conversations a customer rated as not belonging to the issue. They don't count against a fix. Empty without a fix. Not narrowed by the workflow filter.
ReinforcementLoopV2IssueConnection

Object type. One page of RL V2 issues.

FieldTypeDescription
nodes[ReinforcementLoopV2Issue!]!This page's issues, in orderBy order.
pageInfoReinforcementLoopV2IssuePageInfo!Pagination information.
emptyReasonReinforcementLoopV2EmptyReasonWhy nodes is empty. Null when nodes has entries, and on a page whose cursor ran past a non-empty result set.
viewerIsStaffBoolean!Whether the caller counts as Monte Carlo staff: their feedback is hidden from customers and they can't ignore issues.
ReinforcementLoopV2IssueConversation

Object type. One conversation a reinforcement-loop issue was diagnosed in.

Backed by the newest report of the issue for this conversation.

FieldTypeDescription
reportUuidUUID!The report record this row is.
conversationIdString!
workflowNameStringWorkflow of the conversation. Null is the no-workflow scope — the agent's spans carry no workflow attribute. An empty string is a separate, explicitly empty-named workflow; neither ever means 'all workflows'.
materializationStringHow the issue shows up in this conversation, rendered by the agent. Null when the caller cannot read agent content.
traceRefs[ReinforcementLoopTraceRef!]!The turns the diagnosis cites; may be empty.
reportedAtDateTime!When the report was ingested.
runUuidUUID!The diagnosis run that reported this conversation.
diagnosisClustersWithheldReasonRawContentWithheldReasonWhy diagnosisClusters and responsibleClusters were withheld, or null when they were not.
diagnosisClusters[ReinforcementLoopV2DiagnosisCluster!]!The Issue clusters that qualified this conversation for diagnosis, as the run recorded them, in manifest order. Empty when cluster content access is denied.
responsibleClusters[ReinforcementLoopV2DiagnosisCluster!]!The diagnosisClusters the agent named as responsible for this issue, in manifest order. Empty for reports sent before the agent named them, and when cluster content access is denied.
impactReinforcementLoopConversationImpact!How bad this conversation was. Its cluster entries are left out when cluster content access is denied.
ReinforcementLoopV2IssueOrder

Enum type. A sort key of getReinforcementLoopV2Issues.

RANK = each Issue space's top issues by rank, then every other issue.
PRIORITY = the served priority: CRITICAL, HIGH, MEDIUM, LOW, then HIDDEN
(only with includeHidden), then issues with no report. Within a priority, the
higher impactScore comes first. CONVERSATION_COUNT = most
conversations first. It is the conversationCount the node reports, so a
workflow filter narrows it. LAST_SEEN_AT = newest first. FIXED_AT = the newest fix
first, then issues with no fix. An issue keeps its fixedAt after the fix ends, so
filter on status FIXED to list current fixes only.

ValueDescription
RANK
PRIORITY
CONVERSATION_COUNT
LAST_SEEN_AT
FIXED_AT
ReinforcementLoopV2IssuePageInfo

Object type. Forward-only pagination info for getReinforcementLoopV2Issues.

FieldTypeDescription
hasNextPageBoolean!Whether more issues follow this page.
endCursorStringCursor resuming after this page's last node; null on an empty page.
ReinforcementLoopWorkflowScope

Enum type. Which workflow scope an issue read covers.

ALL_WORKFLOWS = every workflow of the agent, each node carrying its own
workflowName; NO_WORKFLOW = only issues with no workflow at all (the agent's
spans carry no workflow attribute); NAMED = only the workflow given in
workflowName.

The scope is its own argument rather than a null/absent/value distinction on
workflowName, because a null argument value is indistinguishable from an
omitted one on this API layer — so the no-workflow scope needs a name it can
be asked for by.

Omitting the scope keeps each query's default inference: a workflowName
narrows to that workflow, its absence spans every workflow. New
workflow-scoped reads should take this enum instead of overloading
omission.

ValueDescription
ALL_WORKFLOWS
NO_WORKFLOW
NAMED

Related types

AgentHealthIssueJiraTicket, AgentHealthIssueLinearTicket, AgentHealthIssueServiceNowTicket, AgentHealthPriority, DateTime, GenericScalar, GithubActionTriggerDispatchPrState, GithubActionTriggerDispatchStatus, RawContentWithheldReason, ReinforcementLoopFeedbackPriorityReason, ReinforcementLoopFeedbackRating, ReinforcementLoopFeedbackReason, ReinforcementLoopIssueDispositionReason, ReinforcementLoopIssueStatus, UUID, UserBasicInfo

getSimilarConversations (query)

getSimilarConversations 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

Find similar conversations, nearest first. Returns an empty list when the anchor has no embedding.

Arguments

ArgumentTypeDescription
agentNameString!Cortex or Genie agent name
traceTableMconString!Trace table or platform agent MCON
conversationIdString!Anchor conversation ID
lookbackDaysIntCandidate lookback in days, from 1 to 30 Default: 3.
firstIntMaximum results, from 1 to 100 Default: 10.
filtersSimilarConversationFiltersInputOptional candidate filters

Returns

[SimilarConversation!]!

Example

query GetSimilarConversations($agentName: String!, $traceTableMcon: String!, $conversationId: String!) {
  getSimilarConversations(agentName: $agentName, traceTableMcon: $traceTableMcon, conversationId: $conversationId) {
    conversationId
    distance
  }
}

Types used only by getSimilarConversations

SimilarConversation

Object type. A conversation ranked by semantic similarity to an anchor conversation.

FieldTypeDescription
conversationIdString!Matching conversation ID
distanceFloat!Cosine distance from 0 to 2; smaller means more similar
SimilarConversationFiltersInput

Input object type. Candidate filters applied before similarity ranking.

FieldTypeDescription
hasErrorsBooleanTrue requires errors, false requires no errors, null allows either
minTotalTokensIntInclusive minimum total tokens
maxTotalTokensIntInclusive maximum total tokens
clusterKeys[String!]Match any listed cluster; requires clusteringSpaceUuid
clusteringSpaceUuidUUIDClustering space for clusterKeys
evalTypeStringEvaluation dimension for score bounds
evalMonitorUuidUUIDEvaluation monitor for score bounds
minEvalScoreFloatInclusive minimum latest evaluation score
maxEvalScoreFloatInclusive maximum latest evaluation score

Related types

UUID

getToolCallOverview (query)

getToolCallOverview 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 aggregate tool-call metrics over tool spans for a time range: total tool calls, average calls per trace, tool error rate, and the most-invoked tool with its share of calls. Optionally includes comparison to the previous period.

Arguments

ArgumentTypeDescription
inputGetToolCallOverviewInput!

Returns

ToolCallOverviewMetricsWithComparison

Example

query GetToolCallOverview($input: GetToolCallOverviewInput!) {
  getToolCallOverview(input: $input) {
    totalToolCalls
    avgCallsPerTrace
    toolErrorRate
    topToolName
    topToolSharePct
  }
}

Types used only by getToolCallOverview

GetToolCallOverviewInput

Input object type. Input parameters for getToolCallOverview 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 (exclusive)
includePreviousPeriodComparisonBooleanInclude comparison to previous period of equal length (default: true) Default: true.
filtersTraceFiltersInputOptional filters to refine results (model, workflow and task at span level; conversation resolves whole traces)
segmentFilterTraceSegmentFilterInputOptional segment dimension filter. Restricts the tool spans counted to those whose dimension (MODEL, WORKFLOW, or TASK) matches one of the values (OR logic within the values list); an empty values list disables the filter. Omitted or null counts all tool spans. Note: MODEL is rarely populated on tool spans, as tools are not LLM calls.
ToolCallOverviewMetrics

Object type.

FieldTypeDescription
totalToolCallsInt!
avgCallsPerTraceFloat
toolErrorRateFloat
topToolNameString
topToolSharePctFloat
ToolCallOverviewMetricsWithComparison

Object type.

FieldTypeDescription
totalToolCallsInt!
avgCallsPerTraceFloat
toolErrorRateFloat
topToolNameString
topToolSharePctFloat
prevPeriodToolCallOverviewMetrics

Related types

DateTime, TraceFiltersInput, TraceSegmentFilterInput

getToolCallTimeSeries (query)

getToolCallTimeSeries 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 per-tool time series metrics over tool spans. Returns time-bucketed, gap-filled series segmented by tool name — call volume, latency percentiles, or error count/rate depending on the metric group. Series are capped at the top-N tools by call count unless an explicit toolNames set is given.

Arguments

ArgumentTypeDescription
inputGetToolCallTimeSeriesInput!

Returns

[ToolCallTimeSeriesType]

Example

query GetToolCallTimeSeries($input: GetToolCallTimeSeriesInput!) {
  getToolCallTimeSeries(input: $input) {
    metric
    toolName
    segment
  }
}

Types used only by getToolCallTimeSeries

GetToolCallTimeSeriesInput

Input object type. Input parameters for getToolCallTimeSeries 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 (exclusive)
bucketSizeTraceBucketSize!Size of time buckets (MINUTE, HOUR, DAY, WEEK)
metricGroupToolCallMetricGroupMetric group to return. Each group maps to a set of metrics: VOLUME (call count), LATENCY (avg/p50/p95/p99), ERRORS (error count + error rate). Deprecated: use metricGroups instead.
metricGroups[ToolCallMetricGroup!]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.
topNIntCap the number of returned tool series to the top-N tools by call count. Ignored when toolNames is provided. Default: 10.
toolNames[String!]Optional explicit set of tool names to return; overrides topN when provided.
filtersTraceFiltersInputOptional filters to refine results (model, workflow and task at span level; conversation resolves whole traces)
segmentFilterTraceSegmentFilterInputOptional segment dimension filter (MODEL, WORKFLOW, or TASK). When supplied, series are grouped by that dimension — one series per segment value (aggregated across tools), with toolName null and segment set; only spans whose dimension matches one of the values (OR logic) are counted, and an empty values list disables the filter. A requested value with no tool spans in the window yields no series (rather than an empty line). Omitted or null returns one series per tool (toolName set, segment null). Note: MODEL is rarely populated on tool spans, as tools are not LLM calls.
ToolCallMetricGroup

Enum type. Metric groups for tool-call time series queries.

Each group maps to a set of individual ToolCallTimeSeriesMetric values via
TOOL_CALL_METRIC_GROUP_TO_METRICS.

ValueDescription
VOLUME
LATENCY
ERRORS
ToolCallTimeSeriesMetric

Enum type. Per-tool span-level metrics for tool-call time series queries.

Unlike TraceTimeSeriesMetric (trace-grained, read from agent_traces), these
are computed over tool-call spans (is_tool_call=true) and segmented by tool
name (the span name). A tool span errors when its status code is 2.

ValueDescription
CALL_COUNT
LATENCY_AVG
LATENCY_P50
LATENCY_P95
LATENCY_P99
ERROR_COUNT
ERROR_RATE
ToolCallTimeSeriesType

Object type. Time series for a single tool-call metric, one object per (metric, series).

Without a segmentFilter, one object is returned per (metric, tool) — a chart
renders one line/area per toolName. With a segmentFilter, one object is
returned per (metric, segment value), aggregated across tools — segment
carries the dimension value (e.g. a workflow name) and toolName is null.

FieldTypeDescription
metricToolCallTimeSeriesMetric!The tool-call metric this series represents
toolNameStringThe tool this series represents; null when a segment dimension is active
segmentStringThe segment dimension value this series represents when segmentFilter is supplied — e.g. a workflow name, task name, or model identifier (not the MODEL/WORKFLOW/TASK enum key); null when no segment dimension is active.
buckets[TraceTimeSeriesBucketType!]!Time-bucketed data points (gap-filled; null value where no data)

Related types

DateTime, TraceBucketSize, TraceFiltersInput, TraceSegmentFilterInput, TraceTimeSeriesBucketType

getToolDetail (query)

getToolDetail 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 per-tool detail (last invoked, average latency, invocation count, tables accessed) for a given tool MCON. lastInvoked, avgLatencySeconds, and invocationCount are computed over a fixed trailing 7-day window.

Arguments

ArgumentTypeDescription
mconString!Trace table or platform agent MCON that scopes the lookup.
agentNameString!Name of the agent whose tool is being looked up.
toolNameString!Name of the tool to retrieve detail for.

Returns

ToolDetail

Example

query GetToolDetail($mcon: String!, $agentName: String!, $toolName: String!) {
  getToolDetail(mcon: $mcon, agentName: $agentName, toolName: $toolName) {
    lastInvoked
    avgLatencySeconds
    invocationCount
  }
}

Types used only by getToolDetail

ToolDetail

Object type. Per-tool statistics derived from agent traces.

FieldTypeDescription
lastInvokedDateTime!Timestamp of the most recent invocation in the lookup window.
avgLatencySecondsFloatAverage latency in seconds over measured invocations in the lookup window (null when no invocation is measured).
invocationCountInt!Number of times this tool was invoked in the lookup window.
tablesAccessed[LineageGraphNode!]!Lineage graph nodes for catalogued tables accessed by this tool. Returns an empty list when no upstream tables are recorded for the tool, or when every recorded upstream table has no catalog entry.

Related types

DateTime, LineageGraphNode

getTopTools (query)

getTopTools 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 ranked per-tool aggregate stats over tool spans for a time range: call count and share, average/p95 latency, and error count/rate. Sorted by call count descending. Powers the top-tools bar chart and the tools legend.

Arguments

ArgumentTypeDescription
inputGetTopToolsInput!

Returns

[TopTool]

Example

query GetTopTools($input: GetTopToolsInput!) {
  getTopTools(input: $input) {
    toolName
    callCount
    sharePct
    avgLatencySeconds
    p95LatencySeconds
    errorCount
    errorRate
    segment
    toolTotal
  }
}

Types used only by getTopTools

GetTopToolsInput

Input object type. Input parameters for getTopTools 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 (exclusive)
limitIntMaximum number of tools to return, ranked by call count Default: 10.
filtersTraceFiltersInputOptional filters to refine results (model, workflow and task at span level; conversation resolves whole traces)
segmentFilterTraceSegmentFilterInputOptional segment dimension filter (MODEL, WORKFLOW, or TASK). When supplied, each tool is broken down by segment value: results gain a populated segment and toolTotal (the tool's total across segments), and tools are ranked by toolTotal rather than callCount. Only spans whose dimension matches one of the values (OR logic) are counted; an empty values list disables the filter. Omitted or null returns one row per tool (segment and toolTotal null). Note: MODEL is rarely populated on tool spans, as tools are not LLM calls.
TopTool

Object type.

FieldTypeDescription
toolNameString!
callCountInt!
sharePctFloat!
avgLatencySecondsFloat
p95LatencySecondsFloat
errorCountInt!
errorRateFloat
segmentString
toolTotalInt

Related types

DateTime, TraceFiltersInput, TraceSegmentFilterInput

getTraceExplanation (query)

getTraceExplanation 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 single trace. Each call regenerates — explanations are not persisted.

Arguments

ArgumentTypeDescription
inputGetTraceExplanationInput!

Returns

TraceExplanationResult

Example

query GetTraceExplanation($input: GetTraceExplanationInput!) {
  getTraceExplanation(input: $input) {
    traceId
    summary
    modelId
  }
}

Types used only by getTraceExplanation

GetTraceExplanationInput

Input object type. Input for getTraceExplanation query.

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

Object type. Result of getTraceExplanation: an AI-authored summary of one trace.

FieldTypeDescription
traceIdString!Trace id
summaryString!Explanation of the trace — a single comprehensive markdown paragraph covering what the agent was doing, the steps it took, errors it encountered, slow calls, and anything else worth flagging. 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

Related types

DateTime

getTraceOverview (query)

getTraceOverview 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 aggregated overview metrics for agent traces. Returns total counts, latency percentiles, and token usage for a time range. Optionally includes comparison to the previous period of equal duration.

Arguments

ArgumentTypeDescription
inputGetTraceOverviewInput!

Returns

TraceOverviewMetricsWithComparison

Example

query GetTraceOverview($input: GetTraceOverviewInput!) {
  getTraceOverview(input: $input) {
    totalTraces
    totalConversations
    avgLatency
    p50Latency
    p95Latency
    p99Latency
    totalTokens
    totalPromptTokens
    totalCompletionTokens
    errorCount
    errorPercentage
  }
}

Types used only by getTraceOverview

GetTraceOverviewInput

Input object type. Input parameters for GetTraceOverview 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 (exclusive)
includePreviousPeriodComparisonBooleanInclude comparison to previous period of equal length (default: true) Default: true.
filtersTraceFiltersInputOptional filters to refine results
segmentFilterTraceSegmentFilterInputOptional segment dimension filter. Filters traces by one dimension (MODEL, WORKFLOW, or TASK) using OR logic within the values list. Omitted or null returns all traces.
TraceFeedbackCounts

Object type.

FieldTypeDescription
positiveInt!
negativeInt!
unratedInt!Traces whose feedback has no rating
withCommentInt!Traces whose newest feedback carries a comment, at any rating
negativePercentageFloatPercentage of negative among positive and negative traces. Null when no trace has a rating.
TraceOverviewMetrics

Object type.

FieldTypeDescription
totalTracesInt!
totalConversationsInt!Number of conversations with messages or tool calls from traces matching the selected filters and time range. The end time is excluded; totalTraces currently includes the end time.
avgLatencyFloat
p50LatencyFloat
p95LatencyFloat
p99LatencyFloat
totalTokensBigInt
totalPromptTokensBigInt
totalCompletionTokensBigInt
errorCountInt
errorPercentageFloat
feedbackTraceFeedbackCountsTraces by their newest end-user feedback. Null when feedback is not available for the agent.
TraceOverviewMetricsWithComparison

Object type.

FieldTypeDescription
totalTracesInt!
totalConversationsInt!Number of conversations with messages or tool calls from traces matching the selected filters and time range. The end time is excluded; totalTraces currently includes the end time.
avgLatencyFloat
p50LatencyFloat
p95LatencyFloat
p99LatencyFloat
totalTokensBigInt
totalPromptTokensBigInt
totalCompletionTokensBigInt
errorCountInt
errorPercentageFloat
feedbackTraceFeedbackCountsTraces by their newest end-user feedback. Null when feedback is not available for the agent.
prevPeriodTraceOverviewMetrics

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.