Related queries and mutations in Agent traces and evaluations. Each has its own section.
Queries
getLlmPriceBook (query)
getLlmPriceBook 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 the LLM price book agent costs are computed against: every model with its four per-million-token rates, the unit each rate table is denominated in, and the vendor pages the rates were read from. The book ships with the product and is the same for every account, so this takes no arguments; an account's negotiated rates are layered on top as overrides (see getLlmPriceBookOverrides), so an account holding one is priced from rates this read does not show. A model absent both from a table here and from the account's overrides has no rate and prices to null, never to zero.
Returns
PriceBook
Example
query GetLlmPriceBook {
getLlmPriceBook {
version
lastVerified
editable
}
}Types used only by getLlmPriceBook
getLlmPriceBookAgentCostType
AgentCostTypeEnum type. How an agent's model execution is billed, decided by who runs the model.
Only billing we hold rates for is named here. An agent billed some other way has no
member, is priced by nothing, and renders no cost.
| Value | Description |
|---|---|
SNOWFLAKE_CORTEX |
PriceBook
PriceBookObject type.
| Field | Type | Description |
|---|---|---|
version | Int! | Bumped whenever a rate changes. |
lastVerified | Date! | When the rates were last checked against the vendor pages. Rates are flat rather than effective-dated, so a change re-prices every span still in retention. |
editable | Boolean! | Whether an account can change the rates it is priced against. True: not by editing this shipped book, which is the same for every account, but through per-account overrides (getLlmPriceBookOverrides / upsertLlmPriceBookOverride). |
computations | [PriceBookComputation!]! | The rate tables, ordered by identifier. |
PriceBookComputation
PriceBookComputationObject type.
| Field | Type | Description |
|---|---|---|
computation | ComputationId! | Identifier of the pricing method this table implements. |
unit | RateUnit! | What every rate in this table is denominated in. This is the rate unit, not the cost unit: rates here are per million tokens, and a cost computed from them is reported by getAgentCost.costUnit. That is credits, or the customer's currency when cost rates apply. |
agentCostTypes | [AgentCostType!]! | The kinds of agent priced by this table. An agent billed some other way is named by no cost type, is priced by no table, and renders no cost. |
sources | [PriceBookSource!]! | The vendor pages the rates were read from. |
models | [PriceBookModelRate!]! | Rates by model, grouped by model family with the newest version of each family first. A model absent here has no rate and prices to null -- never to zero. |
PriceBookModelRate
PriceBookModelRateObject type.
| Field | Type | Description |
|---|---|---|
model | String! | Canonical model name. A raw model value is reduced to this first: region, vendor and Databricks endpoint prefixes are stripped, then version and datestamp suffixes, then known aliases are applied. So one row here prices every spelling that reduces to it. |
inputRate | Float! | Fresh input, excluding anything served from or written to cache. |
outputRate | Float! | Generated tokens. |
cacheReadRate | Float! | Input served from the prompt cache. |
cacheWriteRate | Float! | Input written into the prompt cache. Equal to the input rate where the provider does not charge a premium for the write. |
PriceBookSource
PriceBookSourceObject type.
| Field | Type | Description |
|---|---|---|
vendor | String! | The model vendor these rates are for. Not necessarily who publishes the page -- a vendor without a public rate card is cited from a reseller's. |
url | String! | The pricing page the rates were read from. |
RateUnit
RateUnitEnum type. What a rate is denominated in. Costs in different units cannot be summed.
| Value | Description |
|---|---|
USD_PER_MILLION_TOKENS | |
CREDITS_PER_MILLION_TOKENS | |
DBU_PER_MILLION_TOKENS |
Related types
getLlmPriceBookOverrides (query)
getLlmPriceBookOverrides 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 the account's LLM price book overrides: the negotiated per-model rates that replace the shipped book's rates when agent costs are computed. An override names a (computation, model) pair and carries all four per-million-token rates. Every override applies account-wide, to all the account's connections. A pair with no override keeps the shipped rate. Requires the AI agent settings read permission.
Arguments
| Argument | Type | Description |
|---|---|---|
warehouseUuid | UUID | Optional warehouse connection the caller must have access to. Every override applies to all connections, so the list is the same with or without it. |
Returns
Example
query GetLlmPriceBookOverrides {
getLlmPriceBookOverrides {
uuid
warehouseUuid
computation
model
inputRate
outputRate
cacheReadRate
cacheWriteRate
createdTime
updatedTime
}
}Related types
getNodeAttributes (query)
getNodeAttributes 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 raw OTel attributes and error info for a single node from the warehouse. All node types (agent, workflow, task, tool, LLM) return error_message and span_metadata. LLM nodes additionally return prompts and completions when is_llm_call=True. Fired independently after getSpanDetail resolves (when has_error=True) and when the user opens the Metadata or Content tab.
Arguments
| Argument | Type | Description |
|---|---|---|
input | GetNodeAttributesInput! |
Returns
NodeAttributes
Example
query GetNodeAttributes($input: GetNodeAttributesInput!) {
getNodeAttributes(input: $input) {
errorMessage
spanMetadata
prompts
completions
}
}Types used only by getNodeAttributes
getNodeAttributesGetNodeAttributesInput
GetNodeAttributesInputInput object type. Input for the getNodeAttributes query.
| Field | Type | Description |
|---|---|---|
traceTableMcon | String! | MCON of the trace table to query |
spanId | String! | OTel span ID (hex string) |
isLlmCall | Boolean! | True for LLM nodes — fetches prompts and completions in addition to metadata |
fromTimestamp | DateTime! | Start of the time window |
toTimestamp | DateTime! | End of the time window |
agentName | String | Identifies the specific agent when several share one trace table (e.g. multiple Databricks AI/BI Genie spaces collected into one table). Pass the agent's name so the node's attributes resolve to the correct one; omit it for single-agent tables. |
NodeAttributes
NodeAttributesObject type. OTel attributes and error info for a single node fetched from the warehouse.
| Field | Type | Description |
|---|---|---|
errorMessage | String | Human-readable error message derived from exception events or span status |
spanMetadata | String | Full OTel span attributes as a JSON string (key-value map) |
prompts | String | LLM prompts as a JSON string — present when is_llm_call=True |
completions | String | LLM completions as a JSON string — present when is_llm_call=True |
Related types
getNodeDetail (query)
getNodeDetail 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 detail for a single trace tree node including all span fields and trend metrics. Returns a typed node (AgentNodeDetail, WorkflowNodeDetail, TaskNodeDetail, ToolNodeDetail, or LlmNodeDetail) based on span classification. Trend metrics are computed over spans with the same (workflow, task, name) within the active filter period. TimescaleDB-only — no warehouse calls.
Arguments
| Argument | Type | Description |
|---|---|---|
input | GetNodeDetailInput! |
Returns
NodeDetail
Example
query GetNodeDetail($input: GetNodeDetailInput!) {
getNodeDetail(input: $input) {
spanId
traceId
nodeName
parentSpanId
duration
startTime
endTime
ingestTime
hasPrompts
hasCompletions
hasError
agentName
workflow
task
childSpanIds
isToolCall
isLlmCall
status
model
promptTokens
}
}Types used only by getNodeDetail
getNodeDetailGetNodeDetailInput
GetNodeDetailInputInput object type. Input for getNodeDetail query.
| Field | Type | Description |
|---|---|---|
traceTableMcon | String! | MCON of the trace table |
traceId | String! | Trace ID (hex-encoded) |
spanId | String! | Span ID (hex-encoded) |
fromTimestamp | DateTime! | Start of the active filter period (inclusive) |
toTimestamp | DateTime! | End of the active filter period (inclusive) |
agentName | String | Agent the span belongs to. Lets a user who can access that agent, but not its whole trace table, read the span. |
NodeDetail
NodeDetailObject type. Detail for a single trace tree node returned by getNodeDetail.
| Field | Type | Description |
|---|---|---|
spanId | String! | Span ID (hex-encoded) |
traceId | String! | Trace ID (hex-encoded) |
nodeName | String! | Span name |
parentSpanId | String | Parent span ID (hex-encoded); null for root |
duration | Float! | Span duration in milliseconds |
startTime | DateTime | Span start time |
endTime | DateTime | Span end time |
ingestTime | DateTime | Span ingest time |
hasPrompts | Boolean! | Whether span has prompt data |
hasCompletions | Boolean! | Whether span has completion data |
hasError | Boolean! | True if span has OTel error status (status == 2) |
agentName | String | Agent name |
workflow | String | Workflow name |
task | String | Task name |
childSpanIds | [String!]! | IDs of direct child spans |
isToolCall | Boolean | Whether span represents a tool call |
isLlmCall | Boolean | Whether span represents an LLM call |
status | Int | OTel status code (0=unset, 1=ok, 2=error); null when the span carries no status |
model | String | LLM model used; non-null when is_llm_call=true |
promptTokens | Int | Prompt tokens; non-null when is_llm_call=true |
completionTokens | Int | Completion tokens; non-null when is_llm_call=true |
totalTokens | Int | Total tokens; non-null when is_llm_call=true |
trend | SpanTrendMetrics | Trend metrics for spans with the same (workflow, task, name) over the filter period |
SpanTrendMetrics
SpanTrendMetricsObject type. Trend metrics for a span type, aggregated over the active filter period.
| Field | Type | Description |
|---|---|---|
avgDuration | Float | Average span duration in milliseconds over the filter period |
avgTotalTokens | Float | Average total token count over the filter period |
avgPromptTokens | Float | Average prompt token count over the filter period |
avgCompletionTokens | Float | Average completion token count over the filter period |
Related types
getObservedAgentSettings (query)
getObservedAgentSettings 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
An observed agent's settings, such as its split by workflow. Reads no traces. Null when the agent has no settings to change: it was never observed, or it is not on a ClickHouse trace table, so updateObservedAgentSettings refuses it.
Arguments
| Argument | Type | Description |
|---|---|---|
traceTableMcon | String! | MCON of the agent's trace table, as on getAgentMetadataV2. |
agentName | String! | The agent's name. |
Returns
Example
query GetObservedAgentSettings($traceTableMcon: String!, $agentName: String!) {
getObservedAgentSettings(traceTableMcon: $traceTableMcon, agentName: $agentName) {
traceTableMcon
agentName
splitBy
}
}Related types
getPlatformAgentRegistrationDomains (query)
getPlatformAgentRegistrationDomains 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 names and IDs of metadata domains available for platform-agent registration. Requires monitor write permission and includes only domains covered by that permission. Returns an empty list when none are available.
Returns
[PlatformAgentRegistrationDomain!]!
Example
query GetPlatformAgentRegistrationDomains {
getPlatformAgentRegistrationDomains {
id
name
}
}Types used only by getPlatformAgentRegistrationDomains
getPlatformAgentRegistrationDomainsPlatformAgentRegistrationDomain
PlatformAgentRegistrationDomainObject type. A domain available for platform-agent registration.
| Field | Type | Description |
|---|---|---|
id | UUID! | Domain UUID |
name | String! | Domain name |
Related types
getPlatformAgents (query)
getPlatformAgents 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 platform agents for the authenticated user's account
Arguments
| Argument | Type | Description |
|---|---|---|
domainUuid | UUID | Filter results to agents assigned to this domain |
Returns
[PlatformAgent!]!
Example
query GetPlatformAgents {
getPlatformAgents {
id
createdTime
updatedTime
uuid
agentType
agentMcon
agentName
agentDatabase
agentSchema
tablePrefix
recommendationsGeneratedAt
displayName
supportsConversationEval
supportsConversationClustering
supportsTokenMetrics
supportsEndUserFeedback
traceTableMcon
traceTableIngested
}
}Related types
getReinforcementLoopAgent (query)
getReinforcementLoopAgent 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 reinforcement loop's state for one agent: whether the user paused it, and whether the loop can't diagnose it and why. An agent with no saved settings reports the defaults.
Arguments
| Argument | Type | Description |
|---|---|---|
agentName | String! | Observability agent name. |
traceTableMcon | String! | MCON of the agent's trace table — same value passed as traceTableMcon on getAgentGraph. |
Returns
Example
query GetReinforcementLoopAgent($agentName: String!, $traceTableMcon: String!) {
getReinforcementLoopAgent(agentName: $agentName, traceTableMcon: $traceTableMcon) {
agentName
traceTableMcon
isPaused
isRunning
lastCheckedAt
requiresCodeRepo
}
}Related types
getReinforcementLoopCodeProjects (query)
getReinforcementLoopCodeProjects 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 projects of an Azure DevOps integration's organization, sorted. The values project on updateReinforcementLoopAgent's codeRepos accepts. Fails with VALIDATION_ERROR when Azure DevOps refuses the read, REQUEST_TIMEOUT when it doesn't answer in time, and RATE_LIMIT_EXCEEDED when it is limiting requests.
Arguments
| Argument | Type | Description |
|---|---|---|
installationUuid | UUID! | One of the account's Azure DevOps integrations. |
Returns
[String!]!
Example
query GetReinforcementLoopCodeProjects($installationUuid: UUID!) {
getReinforcementLoopCodeProjects(installationUuid: $installationUuid)
}Related types
getReinforcementLoopCodeRepos (query)
getReinforcementLoopCodeRepos 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 repos an installation can read, sorted by name. The values repo on updateReinforcementLoopAgent's codeRepos accepts. Fails with VALIDATION_ERROR when the host refuses the read, REQUEST_TIMEOUT when Azure DevOps doesn't answer in time, and RATE_LIMIT_EXCEEDED when it is limiting requests.
Arguments
| Argument | Type | Description |
|---|---|---|
installationUuid | UUID! | One of the account's GitHub App installations or Azure DevOps integrations. |
project | String | The Azure DevOps project. Required for Azure DevOps; omit for GitHub. |
Returns
[ReinforcementLoopCodeRepoOption!]!
Example
query GetReinforcementLoopCodeRepos($installationUuid: UUID!) {
getReinforcementLoopCodeRepos(installationUuid: $installationUuid) {
name
defaultBranch
}
}Types used only by getReinforcementLoopCodeRepos
getReinforcementLoopCodeReposReinforcementLoopCodeRepoOption
ReinforcementLoopCodeRepoOptionObject type. A repo an installation can read.
| Field | Type | Description |
|---|---|---|
name | String! | The value repo takes on save. |
defaultBranch | String | The repo's default branch; null for a GitHub repo or an empty repo. |
Related types
getReinforcementLoopDiagnosisTriggers (query)
getReinforcementLoopDiagnosisTriggers 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
Monte Carlo users only. The reinforcement loop's diagnosis input for an agent's conversations labeled in a window, one payload per Issue space, the agent-wide one first. Every current Issue cluster counts, whatever the selector chose. A conversation appears once, with every cluster it matched. For Snowflake Cortex and Databricks Genie agents, a conversation's workflow is its space's scope workflow, null on the agent-wide space. Read-only: the payload's run uuid names no run.
Arguments
| Argument | Type | Description |
|---|---|---|
agentName | String! | Observability agent name. |
traceTableMcon | String! | MCON of the agent's trace table — same value passed as traceTableMcon on getAgentGraph. Disambiguates agents with identical names across trace tables. |
startTime | DateTime! | Include conversations labeled at or after this instant. |
endTime | DateTime! | Include conversations labeled at or before this instant. |
limit | Int! | Most distinct conversations across all Issue spaces, oldest label first. At most 200. Default: 100. |
Returns
[ReinforcementLoopDiagnosisTrigger!]!
Example
query GetReinforcementLoopDiagnosisTriggers($agentName: String!, $traceTableMcon: String!, $startTime: DateTime!, $endTime: DateTime!, $limit: Int!) {
getReinforcementLoopDiagnosisTriggers(agentName: $agentName, traceTableMcon: $traceTableMcon, startTime: $startTime, endTime: $endTime, limit: $limit) {
issueSpaceUuid
scopeWorkflow
conversationCount
truncated
skippedCount
payload
}
}Types used only by getReinforcementLoopDiagnosisTriggers
getReinforcementLoopDiagnosisTriggersReinforcementLoopDiagnosisTrigger
ReinforcementLoopDiagnosisTriggerObject type. The payload the reinforcement loop would send its diagnosis agent for one Issue space's labeled conversations. Nothing is recorded, so the run uuid names no run.
| Field | Type | Description |
|---|---|---|
issueSpaceUuid | UUID! | |
scopeWorkflow | String | The Issue space's workflow; null for the agent-wide space. |
conversationCount | Int! | Conversations in the payload. |
truncated | Boolean! | The limit or the page cap ran out before this space was read to the end of the window. |
skippedCount | Int! | Labeled conversations left out: no recent turns, a label without run provenance, a workflow outside the space, conflicting labels or a manifest the contract refuses. |
payload | GenericScalar | The dispatch input, one entry in conversations per conversation with every cluster it matched. Null when no conversation qualified. |
Related types
getReinforcementLoopGithubRepos (query)
getReinforcementLoopGithubRepos 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: Deprecated: Use getReinforcementLoopCodeRepos.
DEPRECATED. The names of the repos a GitHub App installation can read, sorted. The values repo on updateReinforcementLoopAgent's githubCodeRepos accepts.
Arguments
| Argument | Type | Description |
|---|---|---|
installationUuid | UUID! | One of the account's GitHub App installations. |
Returns
[String!]!
Example
query GetReinforcementLoopGithubRepos($installationUuid: UUID!) {
getReinforcementLoopGithubRepos(installationUuid: $installationUuid)
}Related types
getReinforcementLoopSelectors (query)
getReinforcementLoopSelectors 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 reinforcement loop's Issue-cluster selectors for one agent, with the clusters available to select. One per Issue space, the agent-wide one first, then each workflow-scoped one; a space without saved settings reports the defaults.
Arguments
| Argument | Type | Description |
|---|---|---|
agentName | String! | Observability agent name. |
traceTableMcon | String! | MCON of the agent's trace table — same value passed as traceTableMcon on getAgentGraph. Disambiguates agents with identical names across trace tables. |
Returns
Example
query GetReinforcementLoopSelectors($agentName: String!, $traceTableMcon: String!) {
getReinforcementLoopSelectors(agentName: $agentName, traceTableMcon: $traceTableMcon) {
issueSpaceUuid
agentName
traceTableMcon
scopeWorkflow
selectedClusterKeys
selectsAllClusters
isEnabled
evalScoreThreshold
}
}Related types
Source: The GraphQL API reference
This page is generated from the GraphQL schema on each release. Changes made in ReadMe are overwritten.
