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

# Delete agent

`DELETE /agents/{agent_id}`

## Request

- Base URL: `https://api.coval.dev/v1`
- URL: `https://api.coval.dev/v1/agents/{agent_id}`
- Auth: API key in header `x-api-key`

Soft-delete an agent configuration, marking it as inactive while preserving the record. Agents referenced by active Templates cannot be deleted.

## Path parameters

- `agent_id` string, required

## Response `200`

Agent deleted successfully (or already deleted)

- object

## Other responses

- `400`: Missing agent_id
- `401`: Authentication failed
- `404`: Agent not found or belongs to different organization
- `409`: Agent is referenced by one or more active Templates
- `500`: Internal server error

---

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