Related queries and mutations in AI features. Each has its own section.
Queries
getAgentMemorySuggestions (query)
getAgentMemorySuggestions 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
List a domain's memory suggestions, oldest first. Only a Monte Carlo agent limited to the domain may call it.
Arguments
| Argument | Type | Description |
|---|---|---|
domainUuid | UUID! | |
status | AgentMemorySuggestionStatus | PENDING (the default) leaves out suggestions older than 7 days. Default: "PENDING". |
Returns
Example
query GetAgentMemorySuggestions($domainUuid: UUID!) {
getAgentMemorySuggestions(domainUuid: $domainUuid) {
id
domainUuid
level
assetMcon
agentType
suggestionText
source
suggestionEvidence
evidenceTool
runAgentId
runThreadId
runTraceId
status
statusReason
createdTime
}
}Related types
AgentMemorySuggestion, AgentMemorySuggestionStatus, UUID
getDomainAgentMemories (query)
getDomainAgentMemories 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
List the memories of a domain and of its assets
Arguments
| Argument | Type | Description |
|---|---|---|
domainUuid | UUID! | |
mcons | [String!] | Limit the asset memories to these MCONs. Domain memories always return. |
Returns
[AgentMemory!]!
Example
query GetDomainAgentMemories($domainUuid: UUID!) {
getDomainAgentMemories(domainUuid: $domainUuid) {
id
level
domainUuid
assetMcon
agentType
memoryText
createdBy
authorName
createdTime
creationSource
creationClient
assetMissing
}
}Related types
getMemoryCurationItems (query)
getMemoryCurationItems 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
A memory curation's items in post order, all or by number. Name the curation by its id, or by the agent thread its post went out from. A person with memory access to the curation's domain, or an agent limited to it, may call it. Fails with MEMORY_CURATION_INVALID when both or neither id is given, and MEMORY_CURATION_ITEM_NOT_FOUND for an unknown curation, thread or number.
Arguments
| Argument | Type | Description |
|---|---|---|
curationId | UUID | The curation. Give this or agentThreadId. |
agentThreadId | String | The agent thread the curation's post went out from. Give this or curationId. |
numbers | [Int!] | Item numbers to read. Omit for every item, conflicts included. |
Returns
Example
query GetMemoryCurationItems {
getMemoryCurationItems {
id
curationId
itemNumber
kind
agentType
level
assetMcon
itemText
itemReason
status
resolvedTime
suggestionIds
createdTime
}
}Related types
getRecentMemoryCurationItems (query)
getRecentMemoryCurationItems 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
Items of the domain's curations posted in the last 10 days, in any status and conflicts included, newest post first. A curation that was never posted is left out. Only a Monte Carlo agent limited to the domain may call it.
Arguments
| Argument | Type | Description |
|---|---|---|
domainUuid | UUID! |
Returns
Example
query GetRecentMemoryCurationItems($domainUuid: UUID!) {
getRecentMemoryCurationItems(domainUuid: $domainUuid) {
id
curationId
itemNumber
kind
agentType
level
assetMcon
itemText
itemReason
status
resolvedTime
suggestionIds
createdTime
}
}Related types
getRejectedMemoryCurationItems (query)
getRejectedMemoryCurationItems 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
Items people rejected in the domain's curations of the last 90 days, newest first. Only a Monte Carlo agent limited to the domain may call it.
Arguments
| Argument | Type | Description |
|---|---|---|
domainUuid | UUID! |
Returns
Example
query GetRejectedMemoryCurationItems($domainUuid: UUID!) {
getRejectedMemoryCurationItems(domainUuid: $domainUuid) {
id
curationId
itemNumber
kind
agentType
level
assetMcon
itemText
itemReason
status
resolvedTime
suggestionIds
createdTime
}
}Related types
Mutations
applyMemoryCurationItems (mutation)
applyMemoryCurationItems 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
Save the picked items of a posted memory curation as the calling person, each in its own transaction, and reject the curation's other numbered items that are still proposed. A picked item that fails stays proposed, its failureReason says why, and the other items are still saved. Only a person with memory edit access to the curation's domain may call it. Fails with MEMORY_CURATION_INVALID when both or neither id is given, MEMORY_CURATION_ITEM_NOT_FOUND for an unknown or unposted curation, thread or number, MEMORY_CURATION_EXPIRED for a curation more than 7 days old, and MEMORY_CURATION_INVALID_ITEM for no number, a number or edit given twice, an edit for an item not picked or for a removal, or edit text that is empty or too long. An unexpected error can leave the items before it saved.
Arguments
| Argument | Type | Description |
|---|---|---|
agentThreadId | String | The agent thread the curation's post went out from. Give this or curationId. |
curationId | UUID | The curation. Give this or agentThreadId. |
itemNumbers | [Int!]! | The numbers the person picked, each once. At least 1. |
textEdits | [MemoryCurationTextEdit!] | The person's own text for some of the picked items, one per item. |
Returns
ApplyMemoryCurationItems
Example
mutation ApplyMemoryCurationItems($itemNumbers: [Int!]!) {
applyMemoryCurationItems(itemNumbers: $itemNumbers) {
rejectedItemNumbers
}
}Types used only by applyMemoryCurationItems
applyMemoryCurationItemsApplyMemoryCurationItems
ApplyMemoryCurationItemsObject type. Save the picked items of a posted memory curation as the calling person.
| Field | Type | Description |
|---|---|---|
results | [MemoryCurationItemResult!]! | One result per picked item, in post order. |
rejectedItemNumbers | [Int!]! | The items this call rejected: every other numbered item still proposed. |
MemoryCurationApplyFailure
MemoryCurationApplyFailureEnum type. Why a picked item was not applied. NOT_PROPOSED: it was already applied, rejected or expired. MEMORY_CHANGED: a memory it changes was edited or deleted since the curation. LIMIT_REACHED: the domain or asset has the most memories allowed. ASSET_NOT_IN_DOMAIN: its asset left the domain.
| Value | Description |
|---|---|
NOT_PROPOSED | |
MEMORY_CHANGED | |
LIMIT_REACHED | |
ASSET_NOT_IN_DOMAIN |
MemoryCurationItemResult
MemoryCurationItemResultObject type.
| Field | Type | Description |
|---|---|---|
itemNumber | Int! | |
applied | Boolean! | |
failureReason | MemoryCurationApplyFailure | Why it was not applied. Null when applied. |
memoryIds | [UUID!]! | The memory the item saved. Empty for a removal and for a failed item. |
MemoryCurationTextEdit
MemoryCurationTextEditInput object type.
| Field | Type | Description |
|---|---|---|
itemNumber | Int! | |
itemText | String! | The person's own text for the item, saved in place of the proposed text. At most 300 characters. Not for a REMOVE item. |
Related types
createAgentMemory (mutation)
createAgentMemory 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
Save a memory for the AI agents
Arguments
| Argument | Type | Description |
|---|---|---|
memory | AgentMemoryInput! |
Returns
CreateAgentMemory
Example
mutation CreateAgentMemory($memory: AgentMemoryInput!) {
createAgentMemory(memory: $memory) {
memory {
id
level
domainUuid
assetMcon
agentType
memoryText
createdBy
authorName
createdTime
creationSource
creationClient
assetMissing
}
}
}Types used only by createAgentMemory
createAgentMemoryAgentMemoryInput
AgentMemoryInputInput object type.
| Field | Type | Description |
|---|---|---|
level | AgentMemoryLevel! | |
domainUuid | UUID! | |
assetMcon | String | MCON of the asset. Required at the asset level; omit it (not null) otherwise. |
agentType | AiAgentType! | |
memoryText | String! | Saved as one line: line breaks and other non-printable characters become spaces, and repeated spaces collapse. At most 300 characters after that. |
CreateAgentMemory
CreateAgentMemoryObject type. Save a memory for the agents of a domain, or for one asset in the domain.
| Field | Type | Description |
|---|---|---|
memory | AgentMemory! |
Related types
AgentMemory, AgentMemoryLevel, AiAgentType, UUID
createAgentMemorySuggestions (mutation)
createAgentMemorySuggestions 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
Save an agent run's memory suggestions for one domain, all or none. Needs memory edit permission on the domain. An agent identity must be limited to the domain. Fails with AGENT_MEMORY_SUGGESTION_LIMIT_REACHED past 200 waiting suggestions.
Arguments
| Argument | Type | Description |
|---|---|---|
domainUuid | UUID! | |
run | AgentMemorySuggestionRunInput! | |
suggestions | [AgentMemorySuggestionInput!]! | 1 to 10 suggestions. |
Returns
CreateAgentMemorySuggestions
Example
mutation CreateAgentMemorySuggestions($domainUuid: UUID!, $run: AgentMemorySuggestionRunInput!, $suggestions: [AgentMemorySuggestionInput!]!) {
createAgentMemorySuggestions(domainUuid: $domainUuid, run: $run, suggestions: $suggestions) {
suggestions {
id
domainUuid
level
assetMcon
agentType
suggestionText
source
suggestionEvidence
evidenceTool
runAgentId
runThreadId
runTraceId
status
statusReason
createdTime
}
}
}Types used only by createAgentMemorySuggestions
createAgentMemorySuggestionsAgentMemorySuggestionInput
AgentMemorySuggestionInputInput object type.
| Field | Type | Description |
|---|---|---|
level | AgentMemoryLevel! | DOMAIN or ASSET. ACCOUNT is refused. |
assetMcon | String | MCON of an asset in the domain. Required at the asset level; omit otherwise. |
agentType | AiAgentType! | |
suggestionText | String! | At most 300 characters. |
source | AgentMemorySuggestionSource! | |
suggestionEvidence | String! | A short quote or fact from the run. At most 500 characters. |
evidenceTool | String | Tool the evidence came from. At most 256 characters. |
AgentMemorySuggestionRunInput
AgentMemorySuggestionRunInputInput object type. The run that wrote the suggestions. Fill it from the run, not from model output.
| Field | Type | Description |
|---|---|---|
agentId | String! | Agent (graph) of the run. At most 256 characters. |
threadId | String | Thread of the run. At most 256 characters. |
traceId | String | Trace of the run. At most 256 characters. |
CreateAgentMemorySuggestions
CreateAgentMemorySuggestionsObject type. Save a run's memory suggestions for one domain. All of them are saved, or none.
| Field | Type | Description |
|---|---|---|
suggestions | [AgentMemorySuggestion!]! |
Related types
AgentMemoryLevel, AgentMemorySuggestion, AgentMemorySuggestionSource, AiAgentType, UUID
createMemoryCuration (mutation)
createMemoryCuration 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
Write tonight's memory curation for one domain. Only the run of the domain's memory curation task may call it, as an agent limited to the domain. Call it every night the run starts, with no items when nothing is worth posting, so the suggestions it does not use are skipped. A curation with fewer than 3 numbered items is not posted, and the suggestions its items cover wait for the next night. Fails with MEMORY_CURATION_NOT_RUNNING_TASK, MEMORY_CURATION_INVALID_ITEM, MEMORY_CURATION_SUGGESTION_NOT_WAITING or MEMORY_CURATION_EXISTS.
Arguments
| Argument | Type | Description |
|---|---|---|
domainUuid | UUID! | |
items | [MemoryCurationItemInput!]! | At most 7. Items are numbered in this order; conflicts get no number. |
scheduledTaskId | UUID! | The curation task whose run makes the call. |
skippedSuggestions | [SkippedMemorySuggestionInput!] | Suggestions the curation does not use, with the reason. Waiting suggestions from before the run that no item covers and this list leaves out are skipped too. |
Returns
CreateMemoryCuration
Example
mutation CreateMemoryCuration($domainUuid: UUID!, $items: [MemoryCurationItemInput!]!, $scheduledTaskId: UUID!) {
createMemoryCuration(domainUuid: $domainUuid, items: $items, scheduledTaskId: $scheduledTaskId) {
curation {
id
domainUuid
curationDate
skippedSuggestionCount
}
}
}Types used only by createMemoryCuration
createMemoryCurationCreateMemoryCuration
CreateMemoryCurationObject type. Write tonight's memory curation for a domain, from the run of its curation task.
| Field | Type | Description |
|---|---|---|
curation | MemoryCuration! |
MemoryCuration
MemoryCurationObject type.
| Field | Type | Description |
|---|---|---|
id | UUID! | |
domainUuid | UUID! | |
curationDate | Date! | UTC date the curation is for. |
skippedSuggestionCount | Int! | |
items | [MemoryCurationItem!]! |
MemoryCurationItemInput
MemoryCurationItemInputInput object type.
| Field | Type | Description |
|---|---|---|
kind | MemoryCurationItemKind! | |
agentType | AiAgentType! | The agents the item is for. USE_CASES is refused. |
level | AgentMemoryLevel! | DOMAIN or ASSET. ACCOUNT is refused. |
assetMcon | String | MCON of an asset in the domain. Required at the asset level; omit otherwise. |
itemText | String | The memory to save, or the conflict. Omit for REMOVE. At most 300 characters. |
itemReason | String! | A short evidence line shown under the item in the post, such as "10 runs agree". At most 300 characters. |
memoryIds | [UUID!] | Memories the item changes: none for NEW and CONTEXT_CONFLICT, 1 for EDIT and REMOVE, 1 or more for MERGE. |
suggestionIds | [UUID!]! | The waiting suggestions the item covers. At least 1, except for a MERGE or REMOVE from the weekly sweep while the account has it. |
SkippedMemorySuggestionInput
SkippedMemorySuggestionInputInput object type.
| Field | Type | Description |
|---|---|---|
suggestionId | UUID! | |
suggestionSkipReason | String! | Why the curation does not use it. At most 300. |
Related types
AgentMemoryLevel, AiAgentType, Date, MemoryCurationItem, MemoryCurationItemKind, UUID
deleteAgentMemory (mutation)
deleteAgentMemory 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
Delete an AI agent memory
Arguments
| Argument | Type | Description |
|---|---|---|
memoryId | UUID! |
Returns
DeleteAgentMemory
Example
mutation DeleteAgentMemory($memoryId: UUID!) {
deleteAgentMemory(memoryId: $memoryId) {
success
}
}Types used only by deleteAgentMemory
deleteAgentMemoryDeleteAgentMemory
DeleteAgentMemoryObject type. Delete a memory permanently.
| Field | Type | Description |
|---|---|---|
success | Boolean! |
Related types
replaceAgentMemory (mutation)
replaceAgentMemory 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
Replace an AI agent memory
Arguments
| Argument | Type | Description |
|---|---|---|
memoryId | UUID! | Memory to replace. |
memoryText | String! | Saved as one line: line breaks and other non-printable characters become spaces, and repeated spaces collapse. At most 300 characters after that. |
Returns
ReplaceAgentMemory
Example
mutation ReplaceAgentMemory($memoryId: UUID!, $memoryText: String!) {
replaceAgentMemory(memoryId: $memoryId, memoryText: $memoryText) {
memory {
id
level
domainUuid
assetMcon
agentType
memoryText
createdBy
authorName
createdTime
creationSource
creationClient
assetMissing
}
}
}Types used only by replaceAgentMemory
replaceAgentMemoryReplaceAgentMemory
ReplaceAgentMemoryObject type. Replace the text of a memory. The level, domain, asset and agent type stay.
The new memory records where this write came from.
| Field | Type | Description |
|---|---|---|
memory | AgentMemory! | The new memory. It has a new id. |
Related types
Source: The GraphQL API reference
This page is generated from the GraphQL schema on each release. Changes made in ReadMe are overwritten.
