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

# 更新 Agent 設定

> 更新 Agent 組態（部分更新）

## 請求

```bash theme={null}
PUT https://api.pathors.com/v1/projects/{projectId}/agent
```

### 路徑參數

<ParamField path="projectId" type="string" required>
  專案 ID
</ParamField>

### 標頭

<ParamField header="Authorization" type="string" required>
  使用您的 Developer Key 進行 Bearer 令牌認證
</ParamField>

### 請求主體

所有欄位皆為選填。只需包含您想更新的欄位。

<ParamField body="name" type="string">Agent 顯示名稱（1-128 個字元）</ParamField>
<ParamField body="type" type="string">Agent 類型：`monolithic` 或 `skill`</ParamField>
<ParamField body="status" type="string">Agent 狀態：`draft` 或 `published`</ParamField>
<ParamField body="globalPrompt" type="string | null">全系統提示</ParamField>
<ParamField body="executionMode" type="string | null">`smart`、`turbo` 或 `balance`</ParamField>
<ParamField body="timezone" type="string | null">時區字串（例如：`Asia/Taipei`）</ParamField>
<ParamField body="memoryEnabled" type="boolean">啟用／停用 Agent 記憶</ParamField>
<ParamField body="beforeStartConfig" type="object | null">會話開始前的執行設定</ParamField>
<ParamField body="postSessionWebhook" type="object | null">會話結束後的 Webhook 設定</ParamField>
<ParamField body="postEvaluationConfig" type="object | null">自動評估設定</ParamField>
<ParamField body="placeholderMessages" type="object | null">依語言區分的佔位訊息</ParamField>
<ParamField body="variableConfigs" type="array | null">變數擷取設定</ParamField>

## 回應

回傳更新後的 Agent 設定。

### 範例

```bash theme={null}
curl -X PUT https://api.pathors.com/v1/projects/{projectId}/agent \
  -H "Authorization: Bearer dk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "globalPrompt": "You are a helpful assistant.",
    "executionMode": "smart",
    "memoryEnabled": true
  }'
```
