> 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/knowledge-base/agent.md).

# 同 Agent 一齊使用

將知識庫綁定到 Agent 後，Agent 可以喺多步任務中搜尋同讀取已授權資料；如果明確需要更新資料，仲可以啟用知識庫管理。

{% hint style="info" %}
普通對話適合一次問答，Agent 適合持續研究、比較、生成文件同按步驟驗收。Agent 只會存取配置中已綁定嘅知識庫。
{% endhint %}

## 普通對話同 Agent 嘅分別

| 普通對話         | Agent            |
| ------------ | ---------------- |
| 每次訊息前臨時選擇知識庫 | 喺 Agent 配置入面長期綁定 |
| 適合即時問答同短比較   | 適合多步研究同文件交付      |
| 主要用召回片段作答    | 可以搜尋資料，並按權限管理知識庫 |
| 當前對話決定資料範圍   | Agent 配置決定可存取範圍  |

## 配置一個只讀知識庫 Agent

{% stepper %}
{% step %}

### 1. 先將知識庫驗收合格

確認目標資料已準備好，並用真實問題完成召回測試。Agent 無法補救缺失正文或錯誤分塊。
{% endstep %}

{% step %}

### 2. 打開 Agent 編輯視窗

入到【工作】，揀目標 Agent，喺選單入面打開【編輯智能體】。
{% endstep %}

{% step %}

### 3. 綁定最小必要知識庫

打開【知識庫】標籤頁，撳【新增知識庫】。只綁定本任務需要嘅庫，避免跨部門或跨版本資料互相干擾。
{% endstep %}

{% step %}

### 4. 啟用知識庫搜尋

打開【內置工具】，啟用【知識庫搜尋】。只讀研究、問答、總結同比較通常到呢度就夠。

<figure><img src="https://2742912793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Ut5BptC3t8CtSU1UWpM%2Fuploads%2FhhOfMB6fKN1zohYjTJzq%2Fclipboard.png?alt=media&amp;token=0de8cf18-cb58-42bb-84b2-0603ddb793ee" alt="Agent 内置工具设置中的知识库搜索和知识库管理能力"><figcaption><p>搜尋用嚟讀取，管理用嚟更改資料；預設由最小權限開始。</p></figcaption></figure>
{% endstep %}

{% step %}

### 5. 用邊界清晰嘅任務測試

要求 Agent 先列出來源，再給結論；如果資料冇支持，要明確寫出，唔可以憑常識補完。
{% endstep %}

{% step %}

### 6. 驗收來源同交付物

檢查每條結論係來自邊個知識庫，文件入面嘅事實同建議有冇分開，缺少證據嘅部分有冇被標記。
{% endstep %}
{% endstepper %}

## 內置工具、知識庫、技能同 MCP 點樣揀

<figure><img src="https://2742912793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Ut5BptC3t8CtSU1UWpM%2Fuploads%2FIdUbdTffaPFsqQbMbg05%2Fclipboard.png?alt=media&amp;token=bccbea1c-dfcd-402c-b418-bd3b419e6516" alt="说明 Agent 内置工具、知识库、技能和 MCP 各自用途的选择关系图"><figcaption><p>查資料用知識庫，重複方法用技能，存取外部系統用 MCP；唔好用擴大權限代替明確任務。</p></figcaption></figure>

## 知識庫搜尋同管理

| 能力    | 可以做乜           | 適用任務        | 預設建議          |
| ----- | -------------- | ----------- | ------------- |
| 知識庫搜尋 | 搜尋、列出同讀取已綁定知識庫 | 問答、研究、總結、比較 | 保持啟用          |
| 知識庫管理 | 新增、刪除或更新知識庫文件  | 已批准資料維護     | 預設關閉，有需要先臨時開啟 |

{% hint style="warning" %}
綁定知識庫只係授予存取範圍，唔會複製出另一份知識庫。資料更新或者重新索引之後，Agent 下次搜尋會用更新後內容。
{% endhint %}

{% hint style="danger" %}
啟用【知識庫管理】之後，新增、刪除同更新都會改變資料或索引。批准前要確認目標知識庫、具體條目、同名衝突處理方式同回退方案。
{% endhint %}

## Agent 嘅配置點樣共同作用

<figure><img src="https://2742912793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Ut5BptC3t8CtSU1UWpM%2Fuploads%2FxhYbDEol5dz2ABjHqfVf%2Fclipboard.png?alt=media&amp;token=f14ffe34-c421-4135-92db-e431ce8512d6" alt="模型分工、可用能力和安全边界共同作用于 Agent 任务与交付结果的架构图"><figcaption><p>模型決定理解同生成，知識庫提供證據，權限決定 Agent 可以執行到邊一步。</p></figcaption></figure>

## 推薦任務模板

### 研究並生成報告

> 喺已綁定知識庫中搵出所有關於海外出差審批同保險嘅規定。先列出來源同衝突點，再生成 Markdown 檢查清單。冇資料支持嘅內容唔好補完。

### 更新常見問題

> 搜尋住宿報銷嘅現有條目，比較最新制度同舊 FAQ。先提供擬修改清單；獲得批准之後再更新相關文件。

### 多知識庫對比

> 分別由「產品手冊」同「售後案例」知識庫搵證據，按「官方規則 / 真實案例 / 建議話術」三欄整理。每條結論保留來源名稱。

## 配置說明

| 配置項   | 推薦起點       | 何時增加         | 風險控制           |
| ----- | ---------- | ------------ | -------------- |
| 綁定知識庫 | 1 個任務相關庫   | 確實有跨庫比較需求    | 喺提示詞入面寫清每個庫嘅用途 |
| 知識庫搜尋 | 開啟         | 只要任務需要查資料    | 驗收來源係咪嚟自綁定範圍   |
| 知識庫管理 | 關閉         | 明確需要新增、刪除或更新 | 逐項批准，並先備份重要資料  |
| 輸出要求  | 事實、推斷、建議分開 | 需要生成報告或文件    | 每條事實保留來源名稱     |

## 用戶案例

小林為售後 Agent 綁定【官方手冊】同【審核案例】，只啟用知識庫搜尋。佢要求 Agent 按設備型號列出安全警告、官方步驟同案例建議，並將三者分開。發現舊案例需要更新時，先臨時開啟管理工具，先睇擬修改清單再批准。

完成標準係：Agent 唔會存取未綁定資料，唔會將案例建議寫成官方規則，所有寫入操作都有明確目標同驗收結果。

## 結果驗收

* 來源只來自當前 Agent 綁定嘅知識庫。
* 搜尋結果涵蓋任務入面每個條件。
* 交付物將資料事實、Agent 推斷同建議分開。
* 管理操作有說明目標、影響同結果。
* 更新資料後重新運行固定召回問題。

## 常見問題

<details>

<summary>普通對話搜到，Agent 點解搜唔到？</summary>

檢查目標知識庫有冇綁定到當前 Agent，以及【知識庫搜尋】有冇啟用。唔同 Agent 嘅綁定範圍係互相唔繼承嘅。

</details>

<details>

<summary>咩情況下唔應該開啟知識庫管理？</summary>

只讀研究、團隊共享制度庫同保留歷史版本嘅資料庫，預設都只開搜尋。需要更新時再臨時開管理並逐項批准。

</details>

<details>

<summary>Agent 想操作未綁定嘅知識庫點算？</summary>

唔好擴到所有知識庫。確認任務真係需要之後，再將目標庫加入當前 Agent，或者改用已經綁定咗嗰個庫嘅 Agent。

</details>

## 繼續閱讀

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>喺對話中使用</strong></td><td>完成一次即時、帶來源嘅問答。</td><td><a href="/docs/zhong-wen-fan-ti/knowledge-base/chat.md">喺對話中使用</a></td></tr><tr><td><strong>數據、私隱同維護</strong></td><td>理解權限、雲端服務同備份邊界。</td><td><a href="/docs/zhong-wen-fan-ti/knowledge-base/data.md">數據、私隱同維護</a></td></tr><tr><td><strong>知識庫應用案例</strong></td><td>參考售後同研究工作流。</td><td><a href="/docs/zhong-wen-fan-ti/knowledge-base/cases.md">知識庫應用案例</a></td></tr></tbody></table>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.cherryai.com.cn/docs/zhong-wen-fan-ti/knowledge-base/agent.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
