Skip to main content

AgentMutations

No description

type AgentMutations {
createAgent(
name: String!
description: String!
): AgentData
updateAgent(
agentId: Long!
name: String!
description: String!
monthlyBudgetUsd: Float
budgetNotifyUserIds: [Long!]
budgetNotifyEmails: String
): Agent
updateAgentDraft(
agentId: Long!
systemPrompt: String!
integrationId: Long
model: String!
settings: String!
): AgentData
releaseAgent(
agentId: Long!
): AgentData
setAgentPaused(
agentId: Long!
paused: Boolean!
): Agent
setAgentUploadAnySite(
agentId: Long!
enabled: Boolean!
): AgentData
setAgentAppInvocable(
agentId: Long!
appInvocable: Boolean!
): Agent
deleteAgent(
agentId: Long!
): Boolean
createAgentMemory(
agentId: Long!
scope: String!
processId: Long
text: String!
): AgentMemory
updateAgentMemory(
agentMemoryId: Long!
scope: String!
processId: Long
text: String!
active: Boolean!
): AgentMemory
deleteAgentMemory(
agentMemoryId: Long!
): Boolean
setOrgAgentBudget(
monthlyBudgetUsd: Float
): Boolean
startTestChatTurn(
agentId: Long!
content: String!
): TestChatTurn
respondToAgentToolCall(
agentRunId: Long!
toolCallId: String!
approved: Boolean!
message: String
editedArgs: String
allowUploadSite: Boolean
): Boolean
cancelAgentRun(
agentRunId: Long!
): Boolean
resetTestSession(
agentId: Long!
): Boolean
generateAgentExternalKey(
agentId: Long!
): String
revokeAgentExternalKey(
agentId: Long!
): Boolean
}

Fields​

AgentMutations.createAgent ● AgentData object​

Create an agent with an empty draft version

AgentMutations.createAgent.name ● String! non-null scalar​
AgentMutations.createAgent.description ● String! non-null scalar​

AgentMutations.updateAgent ● Agent object​

Update agent identity and monthly budget (USD)

AgentMutations.updateAgent.agentId ● Long! non-null scalar​
AgentMutations.updateAgent.name ● String! non-null scalar​
AgentMutations.updateAgent.description ● String! non-null scalar​
AgentMutations.updateAgent.monthlyBudgetUsd ● Float scalar​

Monthly budget in USD (estimated spend, calendar month UTC); null = unlimited

AgentMutations.updateAgent.budgetNotifyUserIds ● [Long!] list scalar​
AgentMutations.updateAgent.budgetNotifyEmails ● String scalar​

AgentMutations.updateAgentDraft ● AgentData object​

Update the agent's draft version (prompt, connection, model, settings)

AgentMutations.updateAgentDraft.agentId ● Long! non-null scalar​
AgentMutations.updateAgentDraft.systemPrompt ● String! non-null scalar​
AgentMutations.updateAgentDraft.integrationId ● Long scalar​
AgentMutations.updateAgentDraft.model ● String! non-null scalar​
AgentMutations.updateAgentDraft.settings ● String! non-null scalar​

AgentSettings JSON (tool refs, brakes, structured output)

AgentMutations.releaseAgent ● AgentData object​

Stamp the draft as the next release and clone a fresh draft. Also requires canManageReleases.

AgentMutations.releaseAgent.agentId ● Long! non-null scalar​

AgentMutations.setAgentPaused ● Agent object​

Pause/unpause an agent (paused agents refuse runs)

AgentMutations.setAgentPaused.agentId ● Long! non-null scalar​
AgentMutations.setAgentPaused.paused ● Boolean! non-null scalar​

AgentMutations.setAgentUploadAnySite ● AgentData object​

Turn the draft's "Upload to any site without asking" waiver on or off for web_interact uploads. Turning it on is refused for API keys and AI copilots: only a signed-in person in the app can accept it, and the server records who and when. Applies at the next release, like every draft setting.

AgentMutations.setAgentUploadAnySite.agentId ● Long! non-null scalar​
AgentMutations.setAgentUploadAnySite.enabled ● Boolean! non-null scalar​

AgentMutations.setAgentAppInvocable ● Agent object​

Allow apps that declare this agent to invoke it. Requires canManageAgents AND canManageReleases, and a released version: agent tools run with the agent's authority, so this hands that authority to every user of every app that declares it

AgentMutations.setAgentAppInvocable.agentId ● Long! non-null scalar​
AgentMutations.setAgentAppInvocable.appInvocable ● Boolean! non-null scalar​

AgentMutations.deleteAgent ● Boolean scalar​

Delete an agent, its versions, sessions and run history

AgentMutations.deleteAgent.agentId ● Long! non-null scalar​

AgentMutations.createAgentMemory ● AgentMemory object​

Teach the agent something by hand (an agent- or process-scoped memory with no source task). Requires canManageAgents; refused for an API key - memory is written only under a person's session.

AgentMutations.createAgentMemory.agentId ● Long! non-null scalar​
AgentMutations.createAgentMemory.scope ● String! non-null scalar​

Agent (every task run) or Process (one process's tasks)

AgentMutations.createAgentMemory.processId ● Long scalar​

Required when scope is Process; ignored otherwise

AgentMutations.createAgentMemory.text ● String! non-null scalar​

AgentMutations.updateAgentMemory ● AgentMemory object​

Edit a memory's text, scope or active flag. Requires canManageAgents.

AgentMutations.updateAgentMemory.agentMemoryId ● Long! non-null scalar​
AgentMutations.updateAgentMemory.scope ● String! non-null scalar​
AgentMutations.updateAgentMemory.processId ● Long scalar​
AgentMutations.updateAgentMemory.text ● String! non-null scalar​
AgentMutations.updateAgentMemory.active ● Boolean! non-null scalar​

An inactive memory is kept but no longer injected

AgentMutations.deleteAgentMemory ● Boolean scalar​

Forget a memory. Requires canManageAgents.

AgentMutations.deleteAgentMemory.agentMemoryId ● Long! non-null scalar​

AgentMutations.setOrgAgentBudget ● Boolean scalar​

Set the org-wide monthly agent budget in USD across all agents (null = unlimited)

AgentMutations.setOrgAgentBudget.monthlyBudgetUsd ● Float scalar​

Org-wide monthly agent budget in USD (estimated spend); null = unlimited

AgentMutations.startTestChatTurn ● TestChatTurn object​

Send a test-chat message: runs the DRAFT version (streams via watchAgentRun)

AgentMutations.startTestChatTurn.agentId ● Long! non-null scalar​
AgentMutations.startTestChatTurn.content ● String! non-null scalar​

AgentMutations.respondToAgentToolCall ● Boolean scalar​

Approve / reject-with-message / edit-args-then-approve a pending tool call

AgentMutations.respondToAgentToolCall.agentRunId ● Long! non-null scalar​
AgentMutations.respondToAgentToolCall.toolCallId ● String! non-null scalar​
AgentMutations.respondToAgentToolCall.approved ● Boolean! non-null scalar​
AgentMutations.respondToAgentToolCall.message ● String scalar​

Shown to the model on rejection so it adapts

AgentMutations.respondToAgentToolCall.editedArgs ● String scalar​

Edited arguments JSON (edit-args-then-approve)

AgentMutations.respondToAgentToolCall.allowUploadSite ● Boolean scalar​

Upload approvals only: also add the card's destination site to the agent's upload sites (draft and live release), so later uploads there run under the tool's normal policy. Requires agent-management permission; ignored on rejections.

AgentMutations.cancelAgentRun ● Boolean scalar​

Stop an in-flight agent run

AgentMutations.cancelAgentRun.agentRunId ● Long! non-null scalar​

AgentMutations.resetTestSession ● Boolean scalar​

Close the caller's test session; the next turn starts fresh

AgentMutations.resetTestSession.agentId ● Long! non-null scalar​

AgentMutations.generateAgentExternalKey ● String scalar​

Generate or rotate the agent's external API key (the credential for its per-agent MCP endpoint). Returns the plaintext key ONCE; rotating invalidates the previous key immediately. Requires a released version.

AgentMutations.generateAgentExternalKey.agentId ● Long! non-null scalar​

AgentMutations.revokeAgentExternalKey ● Boolean scalar​

Clear the agent's external API key: the endpoint 401s every request until a new key is generated

AgentMutations.revokeAgentExternalKey.agentId ● Long! non-null scalar​

Returned By​

agents mutation