---
title: "Delete Agent"
method: DELETE
path: "/api/v1/agents/{agent_id_or_identifier}"
tags: ["agents"]
---

# Delete Agent

`DELETE /api/v1/agents/{agent_id_or_identifier}`

## Request

- Base URL: `https://api.gnosari.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.gnosari.com/api/v1/agents/{agent_id_or_identifier}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-AUTH-TOKEN`

Delete an agent.
Supports both numeric IDs and string identifiers.

If the agent has collected data and ``force`` is not set, returns 409 with
``{"detail": ..., "collected_count": N}``. Retry with ``?force=true`` to
cascade-delete the collected rows (returns 204).

## Path parameters

- `agent_id_or_identifier` string, required

## Query parameters

- `force` boolean: Cascade-delete the agent's collected data (extracted entities)

## Response `204`

Successful Response

## Other responses

- `422`: Validation Error

---

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