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

# Delete an agent

> Destroys the agent record.



## OpenAPI

````yaml /openapi.yaml delete /v1/public/workspaces/{workspace_id}/agents/{id}
openapi: 3.0.1
info:
  title: Fetch Hive Public API
  version: v1
  description: Customer-facing Fetch Hive API endpoints for public API keys.
servers:
  - url: https://api.fetchhive.com
security: []
paths:
  /v1/public/workspaces/{workspace_id}/agents/{id}:
    parameters:
      - name: workspace_id
        in: path
        required: true
        description: Workspace UUID
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        description: Agent UUID
        schema:
          type: string
          format: uuid
    delete:
      tags:
        - Agents
      summary: Delete an agent
      description: Destroys the agent record.
      responses:
        '200':
          description: agent deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Agent deleted
                required:
                  - message
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_response'
        '422':
          description: agent not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Agent not found.
                required:
                  - error
      security:
        - bearer_auth: []
components:
  schemas:
    error_response:
      type: object
      properties:
        error:
          type: string
          example: Invalid access.
      required:
        - error
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      description: 'Workspace API key sent as `Authorization: Bearer <api_key>`.'

````