> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getcargo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create agent

> Create a new AI agent



## OpenAPI

````yaml https://api.getcargo.io/openapi.json post /ai/agents
openapi: 3.1.0
info:
  title: Cargo API
  version: 1.0.0
  description: Cargo Platform API v1
servers:
  - url: https://api.getcargo.io/v1
    description: Cargo API
security:
  - bearerAuth: []
paths:
  /ai/agents:
    post:
      tags:
        - AI - Agents
      summary: Create agent
      description: Create a new AI agent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  title: Name
                  description: Agent name.
                icon:
                  type: object
                  properties:
                    color:
                      type: string
                      enum:
                        - grey
                        - green
                        - purple
                        - yellow
                        - blue
                        - red
                    face:
                      type: string
                  required:
                    - color
                    - face
                  title: Icon
                  description: Agent icon.
                description:
                  title: Description
                  description: Agent description.
                  type: string
                triggers:
                  title: Triggers
                  description: Agent triggers.
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          name:
                            type: string
                          description:
                            anyOf:
                              - type: string
                              - type: 'null'
                          type:
                            type: string
                            const: cron
                          cron:
                            type: string
                          text:
                            type: string
                        required:
                          - name
                          - description
                          - type
                          - cron
                          - text
                      - type: object
                        properties:
                          name:
                            type: string
                          description:
                            anyOf:
                              - type: string
                              - type: 'null'
                          type:
                            type: string
                            const: connector
                          connectorUuid:
                            anyOf:
                              - type: string
                              - type: 'null'
                          integrationSlug:
                            type: string
                          config:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                        required:
                          - name
                          - description
                          - type
                          - connectorUuid
                          - integrationSlug
                          - config
                folderUuid:
                  title: Folder UUID
                  description: Folder identifier for the agent.
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
              required:
                - name
                - icon
              additionalProperties: false
              title: Request body
              description: Request body schema.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  agent:
                    type: object
                    properties:
                      uuid:
                        type: string
                      workspaceUuid:
                        type: string
                      userUuid:
                        anyOf:
                          - type: string
                          - type: 'null'
                      name:
                        type: string
                      icon:
                        type: object
                        properties:
                          color:
                            type: string
                            enum:
                              - grey
                              - green
                              - purple
                              - yellow
                              - blue
                              - red
                          face:
                            type: string
                        required:
                          - color
                          - face
                        additionalProperties: false
                      description:
                        anyOf:
                          - type: string
                          - type: 'null'
                      triggers:
                        type: array
                        items:
                          anyOf:
                            - type: object
                              properties:
                                name:
                                  type: string
                                description:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                type:
                                  type: string
                                  const: cron
                                cron:
                                  type: string
                                text:
                                  type: string
                                temporalScheduleWorkflowId:
                                  type: string
                              required:
                                - name
                                - description
                                - type
                                - cron
                                - text
                                - temporalScheduleWorkflowId
                              additionalProperties: false
                            - type: object
                              properties:
                                name:
                                  type: string
                                description:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                type:
                                  type: string
                                  const: connector
                                connectorUuid:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                integrationSlug:
                                  type: string
                                config:
                                  type: object
                                  propertyNames:
                                    type: string
                                  additionalProperties: {}
                              required:
                                - name
                                - description
                                - type
                                - connectorUuid
                                - integrationSlug
                                - config
                              additionalProperties: false
                      deployedRelease:
                        anyOf:
                          - type: object
                            properties:
                              uuid:
                                type: string
                              userUuid:
                                type: string
                              description:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              templateSlug:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              version:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              actions:
                                type: array
                                items:
                                  allOf:
                                    - type: object
                                      properties:
                                        name:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                        slug:
                                          type: string
                                        description:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                        isBulkAllowed:
                                          type: boolean
                                        config:
                                          type: object
                                          propertyNames:
                                            type: string
                                          additionalProperties: {}
                                      required:
                                        - name
                                        - slug
                                        - description
                                        - isBulkAllowed
                                        - config
                                      additionalProperties: false
                                    - anyOf:
                                        - type: object
                                          properties:
                                            kind:
                                              type: string
                                              const: tool
                                            toolUuid:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                            templateSlug:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                            waitUntilFinished:
                                              type: boolean
                                          required:
                                            - kind
                                            - toolUuid
                                            - templateSlug
                                            - waitUntilFinished
                                          additionalProperties: false
                                        - type: object
                                          properties:
                                            kind:
                                              type: string
                                              const: agent
                                            agentUuid:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                            templateSlug:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                            waitUntilFinished:
                                              type: boolean
                                          required:
                                            - kind
                                            - agentUuid
                                            - templateSlug
                                            - waitUntilFinished
                                          additionalProperties: false
                                        - type: object
                                          properties:
                                            kind:
                                              type: string
                                              const: connector
                                            integrationSlug:
                                              type: string
                                            connectorUuid:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                            actionSlug:
                                              type: string
                                          required:
                                            - kind
                                            - integrationSlug
                                            - connectorUuid
                                            - actionSlug
                                          additionalProperties: false
                              capabilities:
                                type: array
                                items:
                                  oneOf:
                                    - type: object
                                      properties:
                                        slug:
                                          type: string
                                          const: sandbox
                                        config:
                                          type: object
                                          properties:
                                            scope:
                                              type: string
                                              enum:
                                                - chat
                                                - agent
                                          additionalProperties: false
                                      required:
                                        - slug
                                        - config
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        slug:
                                          type: string
                                          const: context
                                        config:
                                          type: object
                                          properties:
                                            isReadOnly:
                                              type: boolean
                                          additionalProperties: false
                                      required:
                                        - slug
                                        - config
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        slug:
                                          type: string
                                          const: app
                                        config:
                                          type: object
                                          properties:
                                            appUuid:
                                              type: string
                                            canPromote:
                                              type: boolean
                                          additionalProperties: false
                                      required:
                                        - slug
                                        - config
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        slug:
                                          type: string
                                          const: code
                                        config:
                                          type: object
                                          properties:
                                            connectorUuid:
                                              type: string
                                            repository:
                                              type: string
                                            defaultBranch:
                                              type: string
                                            rootDirectory:
                                              type: string
                                            env:
                                              type: array
                                              items:
                                                oneOf:
                                                  - type: object
                                                    properties:
                                                      key:
                                                        type: string
                                                        minLength: 1
                                                      type:
                                                        type: string
                                                        const: public
                                                      value:
                                                        type: string
                                                    required:
                                                      - key
                                                      - type
                                                      - value
                                                    additionalProperties: false
                                                  - type: object
                                                    properties:
                                                      key:
                                                        type: string
                                                        minLength: 1
                                                      type:
                                                        type: string
                                                        const: secret
                                                      secretValue:
                                                        type: object
                                                        properties:
                                                          type:
                                                            type: string
                                                            enum:
                                                              - encryption
                                                          isEncrypted:
                                                            type: boolean
                                                          value:
                                                            type: string
                                                        required:
                                                          - type
                                                          - isEncrypted
                                                          - value
                                                        additionalProperties: false
                                                    required:
                                                      - key
                                                      - type
                                                      - secretValue
                                                    additionalProperties: false
                                                type: object
                                          additionalProperties: false
                                      required:
                                        - slug
                                        - config
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        slug:
                                          type: string
                                          const: document
                                        config:
                                          type: object
                                          propertyNames:
                                            type: string
                                          additionalProperties: {}
                                      required:
                                        - slug
                                        - config
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        slug:
                                          type: string
                                          const: webSearch
                                        config:
                                          type: object
                                          propertyNames:
                                            type: string
                                          additionalProperties: {}
                                      required:
                                        - slug
                                        - config
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        slug:
                                          type: string
                                          const: fileSearch
                                        config:
                                          type: object
                                          propertyNames:
                                            type: string
                                          additionalProperties: {}
                                      required:
                                        - slug
                                        - config
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        slug:
                                          type: string
                                          const: documentationSearch
                                        config:
                                          type: object
                                          propertyNames:
                                            type: string
                                          additionalProperties: {}
                                      required:
                                        - slug
                                        - config
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        slug:
                                          type: string
                                          const: codeInterpreter
                                        config:
                                          type: object
                                          propertyNames:
                                            type: string
                                          additionalProperties: {}
                                      required:
                                        - slug
                                        - config
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        slug:
                                          type: string
                                          const: memory
                                        config:
                                          type: object
                                          propertyNames:
                                            type: string
                                          additionalProperties: {}
                                      required:
                                        - slug
                                        - config
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        slug:
                                          type: string
                                          const: suggestedActions
                                        config:
                                          type: object
                                          propertyNames:
                                            type: string
                                          additionalProperties: {}
                                      required:
                                        - slug
                                        - config
                                      additionalProperties: false
                                  type: object
                              suggestedActions:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    text:
                                      type: string
                                    actions:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          slug:
                                            type: string
                                        required:
                                          - slug
                                        additionalProperties: false
                                  required:
                                    - text
                                    - actions
                                  additionalProperties: false
                              systemPrompt:
                                type: string
                              withReasoning:
                                type: boolean
                              temperature:
                                type: number
                              maxSteps:
                                type: number
                              integrationSlug:
                                type: string
                              connectorUuid:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              languageModelSlug:
                                type: string
                              mcpClients:
                                type: array
                                items:
                                  oneOf:
                                    - type: object
                                      properties:
                                        kind:
                                          type: string
                                          const: custom
                                        name:
                                          type: string
                                        url:
                                          type: string
                                        authentication:
                                          anyOf:
                                            - type: object
                                              properties:
                                                issuedAt:
                                                  type: string
                                                accessToken:
                                                  type: string
                                                expiresIn:
                                                  type: number
                                                refreshToken:
                                                  type: string
                                                scope:
                                                  type: string
                                                tokenType:
                                                  type: string
                                                clientId:
                                                  type: string
                                                clientSecret:
                                                  type: string
                                              required:
                                                - issuedAt
                                                - accessToken
                                              additionalProperties: false
                                            - type: 'null'
                                        disabledToolSlugs:
                                          type: array
                                          items:
                                            type: string
                                      required:
                                        - kind
                                        - name
                                        - url
                                        - authentication
                                        - disabledToolSlugs
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        kind:
                                          type: string
                                          const: connector
                                        name:
                                          type: string
                                        connectorUuid:
                                          type: string
                                        integrationSlug:
                                          type: string
                                        disabledToolSlugs:
                                          type: array
                                          items:
                                            type: string
                                      required:
                                        - kind
                                        - name
                                        - connectorUuid
                                        - integrationSlug
                                        - disabledToolSlugs
                                      additionalProperties: false
                                  type: object
                              resources:
                                type: array
                                items:
                                  anyOf:
                                    - type: object
                                      properties:
                                        kind:
                                          type: string
                                          const: model
                                        name:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                        slug:
                                          type: string
                                        description:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                        integrationSlug:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                        modelUuid:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                        filter:
                                          anyOf:
                                            - type: object
                                              properties:
                                                conjonction:
                                                  type: string
                                                  enum:
                                                    - or
                                                    - and
                                                groups:
                                                  type: array
                                                  items: {}
                                              required:
                                                - conjonction
                                                - groups
                                              additionalProperties: false
                                            - type: 'null'
                                        selectedColumnSlugs:
                                          anyOf:
                                            - type: array
                                              items:
                                                type: string
                                            - type: 'null'
                                        limit:
                                          anyOf:
                                            - type: number
                                            - type: 'null'
                                        prompt:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                        isReadOnly:
                                          type: boolean
                                      required:
                                        - kind
                                        - name
                                        - slug
                                        - description
                                        - integrationSlug
                                        - modelUuid
                                        - filter
                                        - selectedColumnSlugs
                                        - limit
                                        - prompt
                                        - isReadOnly
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        kind:
                                          type: string
                                          const: file
                                        name:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                        slug:
                                          type: string
                                        description:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                        items:
                                          type: array
                                          items:
                                            anyOf:
                                              - type: object
                                                properties:
                                                  kind:
                                                    type: string
                                                    const: file
                                                  fileUuid:
                                                    type: string
                                                required:
                                                  - kind
                                                  - fileUuid
                                                additionalProperties: false
                                              - type: object
                                                properties:
                                                  kind:
                                                    type: string
                                                    const: folder
                                                  folderUuid:
                                                    type: string
                                                required:
                                                  - kind
                                                  - folderUuid
                                                additionalProperties: false
                                        prompt:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                      required:
                                        - kind
                                        - name
                                        - slug
                                        - description
                                        - items
                                        - prompt
                                      additionalProperties: false
                              heartbeat:
                                anyOf:
                                  - type: object
                                    properties:
                                      intervalMinutes:
                                        type: integer
                                        exclusiveMinimum: 0
                                        maximum: 9007199254740991
                                      maxMessages:
                                        type: integer
                                        exclusiveMinimum: 0
                                        maximum: 9007199254740991
                                      prompt:
                                        anyOf:
                                          - type: string
                                            minLength: 1
                                          - type: 'null'
                                    required:
                                      - intervalMinutes
                                      - maxMessages
                                      - prompt
                                    additionalProperties: false
                                  - type: 'null'
                              evaluator:
                                anyOf:
                                  - type: object
                                    properties:
                                      rubric:
                                        type: string
                                        minLength: 1
                                      threshold:
                                        type: number
                                        minimum: 0
                                        maximum: 1
                                    required:
                                      - rubric
                                      - threshold
                                    additionalProperties: false
                                  - type: 'null'
                              deployedAt:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              createdAt:
                                type: string
                            required:
                              - uuid
                              - userUuid
                              - description
                              - templateSlug
                              - version
                              - actions
                              - capabilities
                              - suggestedActions
                              - systemPrompt
                              - withReasoning
                              - temperature
                              - maxSteps
                              - integrationSlug
                              - connectorUuid
                              - languageModelSlug
                              - mcpClients
                              - resources
                              - heartbeat
                              - evaluator
                              - deployedAt
                              - createdAt
                            additionalProperties: false
                          - type: 'null'
                      folderUuid:
                        anyOf:
                          - type: string
                          - type: 'null'
                      template:
                        anyOf:
                          - type: object
                            properties:
                              slug:
                                type: string
                              isAvailable:
                                type: boolean
                              scope:
                                type: string
                                enum:
                                  - public
                                  - private
                            required:
                              - slug
                              - isAvailable
                              - scope
                            additionalProperties: false
                          - type: 'null'
                      isReadOnly:
                        type: boolean
                      createdAt:
                        type: string
                      updatedAt:
                        type: string
                      deletedAt:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - uuid
                      - workspaceUuid
                      - userUuid
                      - name
                      - icon
                      - description
                      - triggers
                      - deployedRelease
                      - folderUuid
                      - template
                      - isReadOnly
                      - createdAt
                      - updatedAt
                      - deletedAt
                    additionalProperties: false
                    title: Agent
                    description: Created agent details.
                required:
                  - agent
                additionalProperties: false
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '500':
          description: Internal server error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````