aiAliasesDelete
Delete multiple AI Agent aliases from the AI Agent Registry.
Description: This mutation removes multiple AI Agent aliases in a single operation. For each agent, you can specify which alias IDs to delete. At least one agent entry must be provided. Partial deletion is not allowed: the operation either succeeds for the entire input (and returns counts) or fails with a GraphQL Error and no entities are deleted.
Implementation logic
For each agent in aiAgentsWithAliases, for each alias to delete (the given aliasIds), apply the same rules as aiAliasDelete:
- If the alias is DRAFT (TestAlias): delete the entire agent (and its versions and remaining aliases).
- If the alias is non-DRAFT: delete the alias only.
- If after an alias deletion the associated version has no remaining aliases: delete that version. The entire operation runs in a single transaction. On success, return the counts (aliasesDeleted required, agentsDeleted optional). On any failure, roll back and return a GraphQL Error; no partial deletion is performed.
Input Parameters (AiAliasesDeleteInput):
aiAgentsWithAliases: [AgentWithAliasesInput!]! - Required. Array of agents with their aliases to delete. Must contain at least one entry.
Agent Input Parameters (AgentWithAliasesInput):
agentId: ID! - Required. The unique identifier of the AI Agent whose aliases are to be deleted.aliasIds: [ID!]! - Required. Array of alias IDs to delete.
Response (AiAliasesDeleteResult):
- On success: returns
aliasesDeleted(Int!, primary count) andagentsDeleted(Int). - On failure:
aliasesDeletedandagentsDeletedas0and GraphQL Error is returned to ensure no partial deletion were performed.
Example Request:
mutation DeleteMultipleAiAliases {
aiAliasesDelete(input: {
aiAgentsWithAliases: [
{ agentId: "agent-guid-1",
aliasIds: ["alias-guid-1", "alias-guid-2"]
},
{ agentId: "agent-guid-2", aliasIds: ["alias-guid-11", "alias-guid-21"] }
]
}) {
aliasesDeleted {
aliasesDeleted
agentsDeleted
}
}
Example Response (success):
{
"data": {
"aiAliasesDelete": {
"aliasesDeleted": 3,
"agentsDeleted": 0
}
}
}
aiAliasesDelete(
input: AiAliasesDeleteInput!
): AiAliasesDeleteResult!
Arguments
aiAliasesDelete.input ● AiAliasesDeleteInput! non-null input agent-control-tower
Type
AiAliasesDeleteResult object agent-control-tower
Result of deleting multiple AI Agent aliases. Returned on success; on failure a GraphQL Error is returned and no partial deletion occurs.