aiAgentBulkDelete
UpdatedDelete 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:
- Delete the agent and all its versions.
- Delete all aliases for those versions.
- 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.
Example Request:
mutation DeleteMultipleAiAgentsByIds {
aiAgentBulkDelete(ids: ["9df54c03-aeea-4d99-b0e1-8d8e12664610", "b80f45fc-be0a-4eef-86ba-f2019f9173e8", "f8be63e3-1ff7-44bf-b12f-c5d5f83f445d"]) {
agentsDeleted
}
}
Example Response (success):
{
"data": {
"aiAgentBulkDelete": {
"agentsDeleted": 3
}
}
}
aiAgentBulkDelete(
ids: [ID!]!
): AiAgentBulkDeleteResult!
Arguments
aiAgentBulkDelete.ids ● [ID!]! non-null scalar miscellaneous {#ids}
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.