---
title: "Delete a saved agent."
method: DELETE
path: "/o/{org}/agents/{agent}"
tags: ["Saved agents"]
---

# Delete a saved agent.

`DELETE /o/{org}/agents/{agent}`

## Request

- Base URL: `https://api.prix.dev`
- URL: `https://api.prix.dev/o/{org}/agents/{agent}`
- Auth: HTTP bearer

The agent starts no new session and is no longer listed or readable. Sessions already
started from it run to the end. Only the creator can delete. `If-Match` is optional for an API key, as on an edit.
Deleting an agent made from a template disconnects every account connected to it. A
template that agents are still made from is `409 TEMPLATE_IN_USE`, with their count in `agents`.

## Headers

- `If-Match` string

## Response `200`

The agent is deleted.

- object
  - `id` string, uuid, required
  - `deleted` true, required

## Other responses

- `401`: No bearer, an unknown, revoked or expired one, or an API key on a route keys cannot call.
- `403`: A visible agent belongs to another creator (`FORBIDDEN`).
- `404`: No such agent visible to you, or one already deleted (`NOT_FOUND`).
- `409`: Agents are still made from this template (`TEMPLATE_IN_USE`); delete them first.
- `412`: A concurrent edit won (`STALE_ETAG`); read the agent and delete it again.
- `428`: A signed-in caller sent no `If-Match` (`IF_MATCH_REQUIRED`).

## Changes

- **2026-10-20** `e351f947926b`: 1 info
  - added the non-success response with the status `409`

[Operation history](https://skmtc.dev/getrush/apis/rush-api/changes/o/:org/agents/:agent/delete.md)

---

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