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

# Delete agent

> Permanently delete an agent by ID.

Permanently remove an agent from the platform. If the agent is currently active, it is demoted first. For demote-only, use the demote endpoint.

Deleting a supervisor does not affect its sub-agents or their agent-as-tool wrappers.

A sub-agent cannot be deleted while it is still linked to a supervisor. Unlink it and delete its associated agent-as-tool first.


## OpenAPI

````yaml delete /v1/flow/agents/{agent_id}
openapi: 3.1.0
info:
  title: SeekrFlow API
  description: SeekrFlow API Documentation
  termsOfService: http://www.seekr.com/support
  contact:
    name: Seekr API Support
    url: http://www.seekr.com/contact
    email: contact@seekr.com
  version: 5.87.1
servers:
  - url: https://flow.seekr.com
    description: SeekrBuild server base URL
security: []
paths:
  /v1/flow/agents/{agent_id}:
    delete:
      tags:
        - Agents
      summary: Delete agent
      description: Permanently delete an agent by ID.
      operationId: delete_v1_flow_agents__agent_id__delete
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            title: Agent Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentDeleteResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    AgentDeleteResponse:
      properties:
        id:
          type: string
          title: Id
        deleted:
          type: boolean
          title: Deleted
      type: object
      required:
        - id
        - deleted
      title: AgentDeleteResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: Seekr API Key without 'Bearer' Prefix
      in: header
      name: Authorization

````