---
title: "Delete agent"
method: DELETE
path: "/v2/agents/{agent_key}"
tags: ["Agents"]
---

# Delete agent

`DELETE /v2/agents/{agent_key}`

Deletes an agent and its configuration. Deletion is permanent. If active sessions or other constraints block the deletion, the request returns an error instead.

## Path parameters

- `agent_key` string, required — A unique key that identifies an agent.

## Headers

- `Request-Timeout` integer
- `Request-Timeout-Millis` integer

## Response `204`

The agent is deleted.

## Other responses

- `403` — Permissions do not allow deleting this agent.
- `404` — Agent not found.
- `409` — The agent is still referenced — by aliases, or, for the system judge agent, by evaluators. Remove or rebind the references, then retry.

---

[API](https://skmtc.net/vectara/apis/vectara-rest-api-v2.md) · [All operations](https://skmtc.net/vectara/apis/vectara-rest-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vectara/vectara-rest-api-v2/revisions/e85040b266cc/schema)
