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

# Delete Agent

`DELETE /api/v2/agents/{agent_id}`

## Request

- The document declares no server URL.
- Auth: none declared

Delete agent

Always deletes local agent metadata.
If `delete-backup-too=true`, also permanently deletes the agent memory
namespace in Moorcheh. If that fails, nothing is deleted and the error is
returned, so the request can be retried.

## Path parameters

- `agent_id` string, required

## Query parameters

- `delete-backup-too` boolean: Delete Moorcheh namespace backup

## Headers

- `authorization` string, nullable
- `X-Api-Key` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

## Changes

- **2026-07-14** `51ea5daee7e4`: 2 info
  - added the new optional `header` request parameter `X-Api-Key`
  - added the new optional `header` request parameter `authorization`
- **2026-06-23** `3f3d8570f1a6`: 2 warning
  - deleted the `header` request parameter `X-Api-Key`
  - deleted the `header` request parameter `authorization`

[Operation history](https://skmtc.dev/moorcheh-ai/apis/memanto-memory-that-ai-agents-love/changes/api/v2/agents/:agent_id/delete.md)

---

[API](https://skmtc.dev/moorcheh-ai/apis/memanto-memory-that-ai-agents-love.md) - [All operations](https://skmtc.dev/moorcheh-ai/apis/memanto-memory-that-ai-agents-love/llms.txt) - [OpenAPI document](https://skmtc.dev/moorcheh-ai/apis/memanto-memory-that-ai-agents-love/revisions/ef842776283e?raw)
