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

> Deletes a BYO Agent by its UID.

# Delete BYO Agent

For the complete error reference, see [Error Guide](/rest-api/byo-ai-agents-apis/error-codes).


## OpenAPI

````yaml delete /ai-agents/agents/{uid}
openapi: 3.0.0
info:
  title: AI Agents APIs
  description: API reference for CometChat AI Agents service
  version: '1.0'
servers:
  - url: https://{appId}.api-{region}.cometchat.io/v3
    variables:
      appId:
        default: appId
        description: (Required) App ID
      region:
        enum:
          - us
          - eu
          - in
        default: us
        description: Select Region
security: []
tags:
  - name: ai-agent
    description: ''
paths:
  /ai-agents/agents/{uid}:
    delete:
      tags:
        - Agents
      summary: Delete BYO Agent
      description: Deletes a BYO Agent by its UID.
      operationId: AgentsController_deleteAgent
      parameters:
        - name: uid
          required: true
          in: path
          description: Unique identifier of the agent
          schema:
            type: string
      responses:
        '200':
          description: Agent deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessMessageResponse'
              example:
                success: true
                message: >-
                  Agent with UID '863f3501-af1b-46c1-9740-5c725b85daba' has been
                  deleted successfully
      security:
        - apiKey: []
components:
  schemas:
    SuccessMessageResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
          description: Indicates whether the operation was successful
        message:
          type: string
          example: Operation completed successfully
          description: Human-readable result message
      required:
        - success
        - message
  securitySchemes:
    apiKey:
      type: apiKey
      description: API Key (i.e. Rest API Key from the Dashboard).
      name: apikey
      in: header

````