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

# Delete a Trading Agent

> Permanently remove a trading agent from your account. The agent must be stopped before it can be deleted.

Permanently delete a trading agent and all associated configuration. This action is irreversible. The agent must be in a stopped (`idle`) state before deletion.

## Endpoint

```http theme={null}
DELETE /v1/agents/{agent_id}
```

## Path parameters

<ParamField path="agent_id" type="string" required>
  Unique identifier of the agent to delete.
</ParamField>

## Example request

```bash theme={null}
curl -X DELETE "https://api.eluup.ai/v1/agents/agent_2vL9xQpW" \
  -H "Authorization: Bearer $ELUUP_API_KEY"
```

## Response

A successful deletion returns `204 No Content` with an empty body.

<Warning>
  If the agent is currently `active`, the API returns `409 Conflict`. Stop the agent first using the [Stop Agent](/api-reference/agents/stop-agent) endpoint, then retry the delete.
</Warning>
