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

# Delete Agent

`DELETE /api/agents/{agent_id}`

## Request

- Base URL: `https://api.maritime.sh` (the document declares no server; this is the origin it was published from)
- URL: `https://api.maritime.sh/api/agents/{agent_id}`
- Auth: HTTP bearer

Delete an agent. DB-first, fast response.

The DB row (with its cascades) is the user-visible delete and completes
in milliseconds; runtime cleanup (containers/VMs/volumes on remote hosts,
Inkbox identity) runs as a background task AFTER the 204 is sent. The old
inline order (cleanup first, DB last, no timeouts) meant one slow or dead
host pushed the response past the frontend/edge timeout: the browser
showed an error while the delete eventually succeeded server-side.

## Path parameters

- `agent_id` string, required

## Response `204`

Successful Response

## Other responses

- `422`: Validation Error

---

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