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

# Delete Agent

> Deletes a registered AI agent and all associated payment plans.

Deletes a registered AI agent and all associated payment plans.

This operation is only available to the original builder or an authorized account.

## Path Parameters

| Name    | Type   | Required | Description                                  |
| ------- | ------ | -------- | -------------------------------------------- |
| agentId | string | Yes      | The unique identifier of the agent to delete |

## Example Usage

```ts theme={null}
await payments.deleteAgent(agentId)
```

## Responses

* `200 OK` – Agent successfully deleted
* `403 Forbidden` – Caller is not authorized to delete this agent
* `404 Not Found` – Agent does not exist

## Notes

* You must initialize the `Payments` client with the appropriate `nvmApiKey` before calling this method.
* Deleting an agent is irreversible. Plans tied to the agent will also be removed from the registry.


## OpenAPI

````yaml DELETE /agent/{agentId}
openapi: 3.1.0
info:
  title: Nevermined API
  description: >-
    API for managing AI agents, payment plans, and subscriptions in the
    Nevermined ecosystem
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: http://sandbox.mintlify.com
security:
  - bearerAuth: []
paths:
  /agent/{agentId}:
    delete:
      tags:
        - Agents
      summary: Delete Agent
      description: Deletes a registered AI agent and all associated payment plans.
      operationId: deleteAgent
      parameters:
        - name: agentId
          in: path
          description: The unique identifier of the agent to delete
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Agent successfully deleted
        '403':
          description: Caller is not authorized to delete this agent
        '404':
          description: Agent not found
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````