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.
  • agentVersion: String - Optional. The version of the AI agent (could be null, "DRAFT", or numeric).
  • 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.
  • region: String - Optional. The region associated with the AI agent.
  • purpose: String - Required. Purpose of the AI agent in JSON format.
  • personalityTraitsJson: String - Optional. Personality traits in JSON format.
  • instructions: String - Optional. Specific instructions for 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.
  • versionMetadata: String - Optional. Metadata for the version in JSON format
  • 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: 'ai-provider-account-12345',
agentVersion: "1.0",
agentName: "Alpha",
externalId: "ext-agent-alpha-001",
agentDescription: "Initial version of the AI agent",
region: "us-west-2",
purpose: "{\"name\": \"integration\"}",
personalityTraitsJson: "{\"friendly\": true, \"helpful\": true}",
instructions: "Assist customers with inquiries",
tags: [
{
value: "urgent"
}
],
trustLevel: UNENDORSED,
metadata: "{ \"department\": \"support\" }",
versionMetadata: "{ \"deployment\": \"production\", \"environment\": \"stable\" }"
}) {
id
externalId
createdByOrigin
agentVersions {
id
externalId
version
name
description
region
purpose
personalityTraitsJson
instructions
agentStatus
versionMetadata
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

On this Page