---
title: "Delete an AI Agent (v2)"
method: DELETE
path: "/v2/agents/{idOrAddress}"
tags: ["Agents"]
---

# Delete an AI Agent (v2)

`DELETE /v2/agents/{idOrAddress}`

## Request

- Base URL: `https://api.chat.ethora.com`
- URL: `https://api.chat.ethora.com/v2/agents/{idOrAddress}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Deletes the agent. Owner only. Supports `User JWT` and `B2B Server JWT`.

Its BotInstances are switched off (`status: off`) rather than removed,
so their bot users stay in place. The agent's own knowledge (Web Index
and Docs Index rows carrying its id, and their embeddings) is deleted
with it; `knowledgeDeleted` reports the counts when that step ran.

## Path parameters

- `idOrAddress` string, required

## Response `200`

```
{ ok: true, knowledgeDeleted?: { sites: number|null, docs: number|null, chunks: number|null } }
```

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: The caller does not own the agent. ``` { error: 'Forbidden', code: 'FORBIDDEN' } ```
- `404`: ``` { error: 'Agent not found', code: 'AGENT_NOT_FOUND' } ```
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/ethora/apis/platform-api.md) · [All operations](https://skmtc.dev/ethora/apis/platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ethora/apis/platform-api/revisions/01b6e64378ee?raw)
