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

# 更新智能体 - PUT /v1/workspaces/:workspace_id/agents/:agent_id

> 通过 PUT /v1/workspaces/:workspace_id/agents/:agent_id 更新智能体编队的名称、描述、提示词与工具。最小角色 contributor。

更新智能体编队的名称、描述、提示词与工具。

## 接口

```http theme={null}
PUT /v1/workspaces/:workspace_id/agents/:agent_id
```

## 认证

`Authorization: Bearer <jwt>` 或 `X-API-Key <sk_...>`。最小角色：**contributor**。

## 路径参数

<ParamField path="workspace_id" type="string" required>
  工作空间 id。
</ParamField>

<ParamField path="agent_id" type="string" required>
  智能体 id。
</ParamField>

## 请求体

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

<ParamField body="description" type="string">
  描述。
</ParamField>

<ParamField body="prompt" type="string">
  系统提示词。
</ParamField>

<ParamField body="tools" type="string[]">
  工具列表。
</ParamField>

## 响应

<ResponseField name="updated" type="boolean">
  是否为 true（已更新）。
</ResponseField>

## 示例

<RequestExample>
  ```bash cURL theme={null}
  curl -X PUT https://memo.ariacompute.cn/v1/workspaces/ws_01a2b3c4d5e6/agents/agent_01a2b3c4d5e6 \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{"name":"文档助手 v2","prompt":"你是一个严谨的文档助手。","tools":["rag","search"]}'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "updated": true
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.