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

# 删除智能体

> 从所属 GPU 节点卸载受管智能体，并从咏唱引擎 PIN 移除智能体记录。

删除智能体并清理其资源。对于受管智能体，这会通过 SSH 从宿主 GPU 节点远程卸载该智能体。在删除智能体记录之前，所有关联的训练任务会被级联并移除。

## 接口

**DELETE** `/v1/agents/:id`

认证：需要 Bearer API 密钥。

## 路径参数

<ParamField path="id" type="string" required>
  智能体标识符，例如 ag\_7f8e9d0c。
</ParamField>

## 响应

成功时，处理程序返回的响应结构与其它成功模式一致。

<ResponseField name="ok" type="boolean">
  删除成功时为 true。
</ResponseField>

## 示例

```bash theme={null}
curl -s -X DELETE http://<pin-host>:8001/v1/agents/ag_7f8e9d0c \
  -H "Authorization: Bearer $ARIA_PIN_KEY"
```

```json theme={null}
{
  "ok": true
}
```

从 PIN 控制平面移除一个智能体。该智能体不再出现在机队列表中，也不会再被调度新任务。此调用不会强制停止正在运行的任务。

## 接口

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

## 认证

`Authorization: Bearer <api_key or JWT>`，且账户需管理目标智能体。

## 路径参数

<ParamField path="id" type="string" required>
  机队列表接口返回的智能体标识符。
</ParamField>

## 响应

<ResponseField name="code" type="integer">
  成功时为 `0`。非零表示出错；详见 `message`。
</ResponseField>

<ResponseField name="data" type="object">
  删除结果信封，通常为 `{ "ok": true }`。
</ResponseField>

## 示例

```bash theme={null}
curl -X DELETE https://ariapin.example.com/v1/agents/ag_01H7Z... \
  -H "Authorization: Bearer $ARIAPIN_API_KEY"
```

```json theme={null}
{
  "code": 0,
  "data": { "ok": true },
  "message": ""
}
```

<Warning>
  删除智能体不会取消其当前拥有的任务。如需优雅停止，请先调用任务控制接口。
</Warning>
