Create agent

createAgent(input: CreateProjectAgentInput!): ProjectAgentDocument!

Requires project.agents.write.

Arguments

ArgumentTypeRequired
inputCreateProjectAgentInput!Yes

Input fields

input

CreateProjectAgentInput

FieldTypeRequired
projectReferenceStringNo
sourceTargetKindStringNo
targetBranchIdIDNo
idString!Yes
nameString!Yes
descriptionStringNo
modelStringNo
systemPromptString!Yes
thinkingJSONNo
temperatureFloatNo
maxStepsIntNo
allowedModels[String!]No
skillIds[String!]No
skillSelectionProjectAgentSkillSelectionInputNo
skillsJSONNo
allToolsEnabledBooleanNo

All fields of CreateProjectAgentInput.

Response

Returns ProjectAgentDocument!. Open the type for its fields and nested types.

FieldType
idID!
nameString!
descriptionString
modelString
systemPromptString
thinkingJSON
temperatureFloat
maxStepsInt

All fields of ProjectAgentDocument.

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
mutation CreateAgent($input: CreateProjectAgentInput!) {
  createAgent(input: $input) {
    id
    name
    allowedModels
    allToolsEnabled
    avatar
  }
}
json
{
  "input": {
    "projectReference": "00000000-0000-4000-8000-000000000001",
    "id": "example",
    "name": "example",
    "systemPrompt": "example"
  }
}