aiAgentCreate
Create a new AI Agent in the AI Agent Registry.
Description: This mutation creates a new AI Agent associated with the authenticated user's account. On creation, a DRAFT version and a default draft alias are automatically created.
Uniqueness Constraint: Within a given provider account and IDP account, each AI Agent must be unique by agent name. Attempting to create an agent that already exists will result in a validation error.
Input Parameters (AiAgentCreateInput):
providerAccountId: ID! - Required. The unique identifier of the AI Agent Custom Type Provider account where the internal agent will be created.agentName: String - Required. Name of the AI agent.externalId: ID - Optional. External identifier for the AI agent in the provider system.agentDescription: String - Optional. Description of the AI agent.tags: Array of type AiAgentTagInput - Optional. Tags are applied to the draft alias.trustLevel: AiAgentRegistryTrustLevel - Optional. Trust level applied to the draft alias; defaults to UNENDORSED if omitted.metadata: String - Optional. Metadata for the agent in JSON format.
Response:
- Returns the newly created
AiAgentobject including the DRAFT version with TestAlias as draft alias.
Example Request:
mutation CreateAiAgent {
aiAgentCreate(input: {
providerAccountId: 'ai-provider-account-12345',
agentName: "Alpha",
externalId: "ext-agent-alpha-001",
agentDescription: "Initial version of the AI agent",
tags: [
{
value: "urgent"
}
],
trustLevel: UNENDORSED,
metadata: "{ \"department\": \"support\" }"
}) {
id
externalId
createdByOrigin
agentVersions {
id
externalId
version
name
description
agentStatus
agentAliases {
id
name
externalId
trustLevel
tags {
id
key
value
}
}
tags {
id
key
value
}
llms {
id
name
description
version
}
syncData {
lastSyncStatus
lastSyncStartDate
lastSyncEndDate
}
auditData {
createdByUserId
createdTime
modifiedByUserId
modifiedTime
createdByOrigin
updatedByOrigin
updatedAtProviderTime
}
}
}
}
aiAgentCreate(
input: AiAgentCreateInput!
): AiAgent
Arguments
aiAgentCreate.input ● AiAgentCreateInput! non-null input agent-control-tower
Type
AiAgent object agent-control-tower
Was this topic helpful?