Waiting for engine...
Skip to main content

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 AiAgent object including the DRAFT version with TestAlias as draft alias.

Example Request:

mutation CreateAiAgent {
aiAgentCreate(input: {
providerAccountId: "075f4a19-b33c-439e-835d-ac6e8634b5d3",
agentName: "Alpha",
externalId: "ext-agent-alpha-001",
agentDescription: "Initial version of the AI agent",
tags: [
{
key: "priority",
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
}
}
}
}

Example Response (success):


{
"data": {
"aiAgentCreate": {
"id": "37b35a1c-10d9-4be3-b5b9-604eb62f99f4",
"externalId": "ext-agent-alpha-001",
"createdByOrigin": "REGISTRY",
"agentVersions": [
{
"id": "e7fabdf1-b88e-4b3f-b0fd-eacb332073f5",
"externalId": null,
"version": "DRAFT",
"name": "Alpha",
"description": "Initial version of the AI agent",
"agentStatus": "PREPARING",
"agentAliases": [
{
"id": "adafc48d-ca0b-4087-8aeb-29568bdd78e4",
"name": "TestAlias",
"externalId": null,
"trustLevel": "UNENDORSED",
"tags": [
{ "id": "6f9fe561-2381-488a-92ca-0b79f1c52316", "key": "priority", "value": "urgent" }
]
}
],
"tags": [
{ "id": "6f9fe561-2381-488a-92ca-0b79f1c52316", "key": "priority", "value": "urgent" }
],
"llms": [],
"syncData": null,
"auditData": {
"createdByUserId": "617b34c7-d14f-4a7b-a0fe-9047031618c5",
"createdTime": "2026-09-17T10:00:00Z",
"modifiedByUserId": "617b34c7-d14f-4a7b-a0fe-9047031618c5",
"modifiedTime": "2026-09-17T10:00:00Z",
"createdByOrigin": "REGISTRY",
"updatedByOrigin": "REGISTRY",
"updatedAtProviderTime": null
}
}
]
}
}
}

aiAgentCreate(
input: AiAgentCreateInput!
): AiAgent

Arguments​

aiAgentCreate.input ● AiAgentCreateInput! non-null input agent-control-tower {#input}

Type​

AiAgent object agent-control-tower

On this Page