> 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="/files/75f064ee023e19d5ff981c5938dc6c935deed250" alt="Agent 内置工具设置中的知识库搜索和知识库管理能力"><figcaption><p>搜尋用嚟讀取，管理用嚟改資料；預設由最少權限開始。</p></figcaption></figure>
{% endstep %}

{% step %}

### 5. 用界線清楚嘅任務測試

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

{% step %}

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

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

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

<figure><img src="/files/a3a9b13e6ad4f5a99a4d1321d86a76c844aef005" alt="说明 Agent 内置工具、知识库、技能和 MCP 各自用途的选择关系图"><figcaption><p>查資料用知識庫，重複方法用技能，存取外部系統用 MCP；唔好用擴大權限代替明確任務。</p></figcaption></figure>

## 知識庫搜尋同管理

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

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

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

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

<figure><img src="/files/480b7f9081e59ccdb75f19e3add6889385b2dc4b" 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="/pages/ac615ed35f3933ef3b20986efc772027675d3edd">/pages/ac615ed35f3933ef3b20986efc772027675d3edd</a></td></tr><tr><td><strong>數據、私隱同維護</strong></td><td>理解權限、雲端服務同備份界線。</td><td><a href="/pages/c717d714b290fe2e0838ea72d335a09917e42a89">/pages/c717d714b290fe2e0838ea72d335a09917e42a89</a></td></tr><tr><td><strong>知識庫應用案例</strong></td><td>參考售後同研究工作流。</td><td><a href="/pages/a93aa6114ded63c7f1815945ad2cd6f02d8f6e58">/pages/a93aa6114ded63c7f1815945ad2cd6f02d8f6e58</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 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/knowledge-base/agent.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.
