Waiting for engine...
Skip to main content

aiAgentBulkDelete

Delete multiple AI Agents with all sub-entities by ID from the AI Agent Registry.

Description: This mutation permanently removes multiple AI Agents from the AI Agent Registry in a single operation. For each specified agent ID, the agent and all its sub-entities are deleted. Partial deletion is not allowed: the operation either succeeds for the entire input (and returns the number of agents deleted) or fails with a GraphQL Error and no entities are deleted.

Implementation logic For each agent ID in the input array:

  1. Delete the agent and all its versions.
  2. Delete all aliases for those versions.
  3. Remove all associations from the agent and its versions. Associated entities (tasks, tools, guardrails, LLMs) are deleted only if no other agents are using them; tags are removed with the versions. The entire operation runs in a single transaction. On success, return AiAgentBulkDeleteResult with agentsDeleted count. On any failure, roll back and return a GraphQL Error; no partial deletion is performed.

Input Parameters:

  • ids: [ID!]! - Required. Array of unique identifiers of the AI Agents to be deleted. Must contain at least one ID.

Response (AiAgentBulkDeleteResult):

  • On success: returns agentsDeleted (Int!) — the number of agents deleted.
  • On failure: a GraphQL Error is returned and no partial deletion is performed.

Number of agents deleted: The count of AI Agent entities that were permanently removed from the registry in this operation. Each agent ID in the input that is successfully deleted counts as one. On success, this value equals the number of agent records deleted (and is at most the length of the input array).

Example Request:

mutation DeleteMultipleAiAgentsByIds {
aiAgentBulkDelete(ids: ["ai-agent-id-1", "ai-agent-id-2", "ai-agent-id-3"]) {
agentsDeleted
}
}

Example Response (success):


{
"data": {
"aiAgentBulkDelete": {
"agentsDeleted": 3
}
}
}

aiAgentBulkDelete(
ids: [ID!]!
): AiAgentBulkDeleteResult!

Arguments

aiAgentBulkDelete.ids ● [ID!]! non-null scalar miscellaneous

Type

AiAgentBulkDeleteResult object agent-control-tower

Result of deleting multiple AI Agents by ID. Returned on success; on failure a GraphQL Error is returned and no partial deletion occurs.

On this Page