Related queries and mutations in AI features. Each has its own section.
Queries
getConversation (query)
getConversation is a query in the Monte Carlo GraphQL API, in AI features. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Open a past chat conversation the caller may see
Arguments
| Argument | Type | Description |
|---|---|---|
id | UUID! | An id from searchConversations. |
surface | ConversationSource! | Where the calling chat runs. On SLACK, no web app conversation is returned. Take it from the run, never from text a model wrote. |
Returns
Example
query GetConversation($id: UUID!, $surface: ConversationSource!) {
getConversation(id: $id, surface: $surface) {
id
tldr
date
source
link
lastActivityAt
}
}Related types
ConversationSource, PastConversation, UUID
getConversationForAgentRun (query)
getConversationForAgentRun is a query in the Monte Carlo GraphQL API, in AI features. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Open a Slack conversation within an agent run's scope and time
Arguments
| Argument | Type | Description |
|---|---|---|
id | UUID! | An id from searchConversationsForAgentRun. |
alertId | UUID | The alert the run investigates. Its domains are the scope. Without it, the request's domain override is the scope, and a request with neither is refused. For an account-wide agent the alert is the only scope. Take it from the run, never from text a model wrote. |
activeBefore | DateTime | Only conversations whose last chat turn is at or before this time, such as the alert's creation time. Take it from the run, never from text a model wrote. |
Returns
Example
query GetConversationForAgentRun($id: UUID!) {
getConversationForAgentRun(id: $id) {
id
tldr
date
source
link
lastActivityAt
}
}Related types
DateTime, PastConversation, UUID
opsAgentConversations (query)
opsAgentConversations is a query in the Monte Carlo GraphQL API, in AI features. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Export the account's Operations Agent conversation logs for compliance and security review. Returns conversations newest first, each with its user and agent turns; page with the returned cursor. Delivery is at-least-once — de-duplicate on eventId. Restricted to account owners.
Arguments
| Argument | Type | Description |
|---|---|---|
first | Int | Page size (1..200); defaults to 50. Larger values are capped. |
after | String | Opaque cursor from a previous page; omit for the first page. |
sortBy | OpsAgentConversationSortField | Timestamp the stream advances by. CREATED_TIME (default) surfaces conversations by when they began; UPDATED_TIME by their last turn, so a conversation with new turns resurfaces. A cursor may only be reused with the same value it was issued for. |
startTime | DateTime | Exclude conversations whose sort timestamp is older than this (UTC). |
endTime | DateTime | Exclude conversations whose sort timestamp is newer than this (UTC). |
Returns
OpsAgentConversationConnection!
Example
query OpsAgentConversations {
opsAgentConversations {
nextCursor
hasMore
}
}Types used only by opsAgentConversations
opsAgentConversationsOpsAgentActor
OpsAgentActorObject type. The identity that drove a conversation.
| Field | Type | Description |
|---|---|---|
userId | String | Cognito id of the user who drove the conversation; null for a system- or schedule-triggered run with no human actor. |
email | String | Email of the acting user; null when the id resolves to no current user. |
displayName | String | Display name of the acting user, when known. |
OpsAgentConversation
OpsAgentConversationObject type. One Operations Agent conversation and its turns.
| Field | Type | Description |
|---|---|---|
conversationId | String! | Stable id grouping the turns of one conversation. |
createdTime | DateTime | When the conversation was created (UTC). |
updatedTime | DateTime | When the conversation was last updated (UTC). |
title | String | Generated conversation title, when present. |
actor | OpsAgentActor! | The identity that drove the conversation. |
messages | [OpsAgentMessage!]! | The conversation's user and agent turns, in order. |
OpsAgentConversationConnection
OpsAgentConversationConnectionObject type. A page of Operations Agent conversations.
| Field | Type | Description |
|---|---|---|
conversations | [OpsAgentConversation!]! | The conversations in this page, newest first. |
nextCursor | String | Cursor to pass as after for the next page; null when none remain. |
hasMore | Boolean! | Whether more conversations remain after this page. |
OpsAgentConversationRole
OpsAgentConversationRoleEnum type. Who authored a turn.
| Value | Description |
|---|---|
USER | |
AGENT |
OpsAgentConversationSortField
OpsAgentConversationSortFieldEnum type. Timestamp the export stream advances by.
| Value | Description |
|---|---|
CREATED_TIME | |
UPDATED_TIME |
OpsAgentMessage
OpsAgentMessageObject type. One turn of a conversation: a user prompt or an agent final answer.
| Field | Type | Description |
|---|---|---|
eventId | String! | Stable, unique id for the turn; safe to de-duplicate on across reads. |
role | OpsAgentConversationRole! | Whether the turn was authored by the user or the agent. |
text | String | Displayable message body; null when the turn carries no text. |
Related types
searchConversations (query)
searchConversations is a query in the Monte Carlo GraphQL API, in AI features. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Search the past chat conversations the caller may see
Arguments
| Argument | Type | Description |
|---|---|---|
memoryQuery | String! | What to look for. |
surface | ConversationSource! | Where the calling chat runs. On SLACK, no web app conversation is returned. Take it from the run, never from text a model wrote. |
currentConversationId | String! | Thread id of the calling conversation. It is never returned. Take it from the run, never from text a model wrote. |
source | ConversationSource | Only this source. |
since | DateTime | Only conversations with a chat turn since then. |
Returns
Example
query SearchConversations($memoryQuery: String!, $surface: ConversationSource!, $currentConversationId: String!) {
searchConversations(memoryQuery: $memoryQuery, surface: $surface, currentConversationId: $currentConversationId) {
restrictions
}
}Related types
ConversationSearchResponse, ConversationSource, DateTime
searchConversationsForAgentRun (query)
searchConversationsForAgentRun is a query in the Monte Carlo GraphQL API, in AI features. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Search the Slack conversations within an agent run's scope and time
Arguments
| Argument | Type | Description |
|---|---|---|
memoryQuery | String! | What to look for. |
alertId | UUID | The alert the run investigates. Its domains are the scope. Without it, the request's domain override is the scope, and a request with neither is refused. For an account-wide agent the alert is the only scope. Take it from the run, never from text a model wrote. |
activeBefore | DateTime | Only conversations whose last chat turn is at or before this time, such as the alert's creation time. Take it from the run, never from text a model wrote. |
Returns
Example
query SearchConversationsForAgentRun($memoryQuery: String!) {
searchConversationsForAgentRun(memoryQuery: $memoryQuery) {
restrictions
}
}Related types
ConversationSearchResponse, DateTime, UUID
Mutations
deleteConversation (mutation)
deleteConversation is a mutation in the Monte Carlo GraphQL API, in AI features. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Permanently delete one of the account's Operations Agent conversations, by its conversationId from opsAgentConversations. Deleting a conversation that no longer exists succeeds, so retries are safe. Another agent's conversation is rejected. Restricted to account owners.
Arguments
| Argument | Type | Description |
|---|---|---|
conversationId | String! | The conversationId of a conversation from opsAgentConversations. |
Returns
DeleteConversation
Example
mutation DeleteConversation($conversationId: String!) {
deleteConversation(conversationId: $conversationId) {
conversationId
deleted
}
}Types used only by deleteConversation
deleteConversationDeleteConversation
DeleteConversationObject type. Permanently delete one Operations Agent conversation.
| Field | Type | Description |
|---|---|---|
conversationId | String! | The requested conversation id. |
deleted | Boolean! | Always true: the conversation no longer exists. This includes a conversation that was already deleted, so a retried delete succeeds. |
Source: The GraphQL API reference
This page is generated from the GraphQL schema on each release. Changes made in ReadMe are overwritten.
