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.

Uniqueness Constraint: Within a given provider account, each AI Agent must be unique by the combination of agent name and version. Attempting to create an agent with a name-version combination 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.
  • agentStatus: AgentStatus - Optional. Status of the AI agent (e.g., PREPARING, RUNNING).
  • tags: Array of type AiAgentTagInput - Optional
  • versionMetadata: String - Optional. Metadata for the version in JSON format

Response:

  • Returns the newly created AiAgent object.

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",
llm: { name: "OpenAI GPT-4o" },
region: "us-west-2",
purpose: "{\"name\": \"integration\"}",
personalityTraitsJson: "{\"friendly\": true, \"helpful\": true}",
instructions: "Assist customers with inquiries",
agentStatus: RUNNING,
tags: [
{
value: "urgent"
}
],
versionMetadata: "{ \"deployment\": \"production\", \"environment\": \"stable\" }"
}) {
id
externalId
createdByOrigin
agentVersions {
id
externalId
version
name
description
region
purpose
personalityTraitsJson
instructions
agentStatus
versionMetadata
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