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

# 更新咏唱引擎云智能体定义

> 更新咏唱引擎云智能体的名称、模型、指令、工具或元数据。支持使用 OpenAI beta 形态进行部分更新。

更新一个已有智能体。请求体是一个部分补丁：你包含的任何字段都会被替换，省略的字段保持不变。遵循 OpenAI beta 约定，更新使用 `POST` 作用于资源路径。

## 接口

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

## 认证

`Authorization: Bearer <api_key>` 或 `Authorization: ApiKey <api_key>`。

## 路径参数

<ParamField path="agent_id" type="string" required>
  智能体标识符。
</ParamField>

## 请求体

<ParamField body="name" type="string">
  显示名称。
</ParamField>

<ParamField body="model" type="string">
  底层模型标识符。
</ParamField>

<ParamField body="instructions" type="string">
  系统指令。
</ParamField>

<ParamField body="tools" type="array">
  对工具列表的完整替换。
</ParamField>

<ParamField body="metadata" type="object">
  对元数据的完整替换。
</ParamField>

## 响应

返回完整的更新后智能体对象；形态同 [获取智能体](/api-reference/agent/agents/get)。

## 示例

```bash theme={null}
curl -X POST https://agent.example.com/v1/agents/ag_0198a... \
  -H "Authorization: Bearer $ARIA_AGENT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"instructions": "You are a triage agent. Prefer concise answers."}'
```
