> For the complete documentation index, see [llms.txt](https://docs.cherryai.com.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cherryai.com.cn/docs/zhong-wen-fan-ti/advanced-basic/agent-workspace.md).

# Agent 工作區

Agent 適合處理有明確目標、需要用工具或者文件、可能會持續多個步驟嘅任務。入口係左側導覽【工作】，唔係舊版教程入面嘅頂部標籤。

{% hint style="success" %}
最慳事嘅配置方式，係先話畀 Agent 知你想完成咩，再等佢檢查仲欠咩模型、工具、知識庫或者頻道。要精準控制時，再打開 Agent 編輯視窗或者【設定】手動調整。
{% endhint %}

<figure><img src="/files/fc057a6fe0013b22be8bf5ebcc416a2e3b95343c" alt="Agent 工作区中的 Agent、模型、工作目录和右侧面板"><figcaption></figcaption></figure>

<figure><img src="/files/a24314de50f31a040d15629246490e8b9b0375d9" alt="Agent 从说明交付物、选择工作目录到检查文件和结果的任务闭环图"><figcaption></figcaption></figure>

### 工作區由咩組成

| 部分    | 作用                | 幾時需要留意             |
| ----- | ----------------- | ------------------ |
| Agent | 保存角色、模型、提示詞同能力    | 同一類工作要重複做嘅時候       |
| 任務    | 一次連續嘅工作記錄         | 每個目標獨立開任務，方便保留上下文  |
| 工作目錄  | Agent 可以直接處理嘅文件範圍 | 程式碼、資料整理、文件生成等文件任務 |
| 輸入區   | 發送目標、附件同埋調用工具     | 發起任務或者追加要求         |
| 右側面板  | 查看狀態、文件、子任務同消息流   | 跟蹤長任務、檢查產物或者排錯     |

### 開始一個任務

{% stepper %}
{% step %}

#### 1. 打開【工作】並選擇 Agent

如果已經有合適嘅 Agent 就直接揀；冇嘅話點擊【添加智能體】，喺【基礎信息】入面先揀運行模式，再完成系統提示詞、技能同知識庫四步建立。運行模式建立之後唔可以切換。
{% endstep %}

{% step %}

#### 2. 選擇工作目錄

需要處理本地文件時，揀今次任務所在目錄；唔涉及文件時可以用應用建立嘅預設工作區。一個任務對應一個工作區，避免令 Agent 喺唔相關目錄之間來回搵。
{% endstep %}

{% step %}

#### 3. 用結果描述任務

話畀 Agent 知要交付咩、可以用邊啲資料、有咩限制同埋點先算完成。例如：

```
閱讀當前目錄入面嘅會議記錄，整理出決策、負責人同截止時間，生成 action-items.md。唔好修改原始文件。
```

{% endstep %}

{% step %}

#### 4. 喺右側面板檢查過程同產物

【狀態】顯示活動任務、子智能體、工作流同後台命令；【文件】可以預覽同編輯文字產物；開啟開發者模式之後仲可以睇【調用鏈】。
{% endstep %}
{% endstepper %}

### API 網關提示

Agent 運行要依賴 Cherry Studio 嘅 API 網關。網關未啟用時，應用會提示【啟用並啟動】；亦可以去【設定】→【API 網關】檢查端口、運行狀態同本機安全軟件攔截。

{% hint style="warning" %}
API 網關係 Agent 嘅運行依賴，但唔代表要將接口公開到網絡。保持預設本機使用就得；只有明確要畀其他程式調用時，先需要複製 URL 同 API 密鑰。
{% endhint %}

### 一個 Agent 定係多個 Agent

* 同一角色、同一套能力但任務唔同：重用一個 Agent，新建多個任務。
* 角色、資料範圍或者權限唔同：拆成多個 Agent。
* 一個目標需要並行研究或者多個步驟協作：先畀一個 Agent 用子智能體或者工作流，唔使即刻手動建立好多 Agent。

### 用戶案例：整理項目資料

產品經理將需求說明、訪談記錄同競品資料放喺同一個目錄，建立「需求整理」Agent，綁定產品知識庫並使用【逐次確認】權限。Agent 先讀取資料，再將需求清單同待確認問題寫入新文件。產品經理喺右側【文件】入面直接修改文字，原始資料保持不變。

<details>

<summary>點解 Agent 睇唔到啱啱綁定嘅能力？</summary>

Agent 編輯內容會自動儲存。緊係生成緊嘅回覆唔會被中斷；模型、技能、MCP 同知識庫等變更會由下一條訊息開始生效。如果仲未出現，先確認能力已啟用，再發一條新訊息。

</details>

<details>

<summary>刪除工作目錄會唔會連磁碟檔案一齊刪埋？</summary>

喺任務列表刪除工作目錄時，只會移除 Cherry Studio 入面嘅目錄記錄同該目錄底下嘅任務記錄，唔會刪除磁碟上真實目錄。Agent 喺任務執行期間進行嘅文件操作仍然受所揀權限模式影響。

</details>

<details>

<summary>刪除工作目錄會唔會連磁碟檔案一齊刪埋？</summary>

喺任務列表刪除工作目錄時，只會移除 Cherry Studio 入面嘅目錄記錄同該目錄底下嘅任務記錄，唔會刪除磁碟上真實目錄。Agent 喺任務執行期間進行嘅文件操作仍然受所揀權限模式影響。

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cherryai.com.cn/docs/zhong-wen-fan-ti/advanced-basic/agent-workspace.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
