> ## 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 an agent by its UID.

# Delete Agent

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


## OpenAPI

````yaml delete /ai-agents/agent-builder/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/agent-builder/agents/{uid}:
    delete:
      tags:
        - Agent Builder
      summary: Delete Agent
      description: Deletes an agent by its UID.
      operationId: AgentBuilderController_remove
      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: Operation completed 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

````