> ## 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.

# 更新智能体

> 向咏唱引擎 PIN 中运行在 GPU 节点上的智能体推送更新后的二进制或配置。

触发受管智能体的远程更新。服务器通过 SSH 连接到智能体所在的 GPU 节点，并推送最新的二进制或配置。该智能体必须是具有有效节点绑定与 agent UID 的受管部署。

## 接口

**POST** `/v1/agents/:id/update`

认证：需要 Bearer API 密钥。

## 路径参数

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

## 响应

<ResponseField name="id" type="string" required>
  智能体标识符。
</ResponseField>

<ResponseField name="name" type="string" required>
  智能体名称。
</ResponseField>

<ResponseField name="gpu_count" type="integer">
  GPU 数量。
</ResponseField>

<ResponseField name="status" type="string">
  智能体状态。
</ResponseField>

<ResponseField name="node_id" type="string">
  所属节点标识符。
</ResponseField>

<ResponseField name="version" type="string">
  更新后的智能体版本。
</ResponseField>

<ResponseField name="deploy_state" type="string">
  部署状态，例如 deployed。
</ResponseField>

<ResponseField name="last_error" type="string">
  最近一次错误（若有）。
</ResponseField>

<ResponseField name="agent_uid" type="string">
  唯一的部署 UID。
</ResponseField>

## 示例

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

```json theme={null}
{
  "id": "ag_7f8e9d0c",
  "name": "training-agent",
  "gpu_count": 8,
  "status": "online",
  "node_id": "gn_a1b2c3d4",
  "version": "1.2.1",
  "deploy_state": "deployed",
  "last_error": "",
  "agent_uid": "aria-agent-7f8e9d0c"
}
```
