---
title: "Delete an AI Agent that belongs to an app (v2, tenant actor)"
method: DELETE
path: "/v2/apps/{appId}/agents/{idOrAddress}"
tags: ["Agents"]
---

# Delete an AI Agent that belongs to an app (v2, tenant actor)

`DELETE /v2/apps/{appId}/agents/{idOrAddress}`

## Request

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

Deletes an agent owned by the App's side: the App's creator, the App
itself, or its parent tenant App (agents created with a B2B Server JWT
are owned by the tenant App). Agents are account-level, so deleting an
App never deletes them; this is how automation that creates agents for
an App cleans up after itself. Any other agent, and platform-owned
agents, read as 404. Same effects as `DELETE /v2/agents/{idOrAddress}`.
Supports `User JWT` and `B2B Server JWT`.

## Path parameters

- `appId` string, required
- `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 manage this App. ``` { error: string, code: 'FORBIDDEN' } ```
- `404`: `APP_NOT_FOUND`, or `AGENT_NOT_FOUND` (no such agent on this App's side).
- `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)
