> ## Documentation Index
> Fetch the complete documentation index at: https://docs.onecortex.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete an agent

> Delete an agent and everything it runs: what is removed, what the endpoint answers afterwards, and why it cannot be undone.

<Steps>
  <Step title="Open Settings">
    On the agent's **Settings** tab, find **Delete this agent** and click **Delete agent**.
  </Step>

  <Step title="Type the agent's name">
    Type the agent's name exactly, and confirm. A name that does not match is refused: `Type the agent name exactly to confirm.`
  </Step>
</Steps>

## What happens

Deleting an agent immediately removes the running agent, its versions' images, its configuration and its logs. It cannot be undone and cannot be restored.

The endpoint stops answering at once. Calls to it get `410`:

```json theme={null}
{ "error": { "code": "agent_deleted", "message": "This agent has been deleted.", "requestId": "req_01K..." } }
```

API keys scoped to the agent stop being useful, but are not revoked: revoke them on **API keys**.

## What is kept

The agent's history is kept: the **Agents** list can show deleted agents, with who deleted them, when, and the last version they reached. Nothing in it can be deployed or called.

Your repository is not touched. To deploy the same agent again, create a new agent from the same repository and folder. It gets a new ID and endpoint.
