> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/org/roles/contact-role-comparison.md). Agents can also search and read this documentation through its [MCP server](https://docs.maiagent.ai/~gitbook/mcp).

# 角色和聯絡人的差異

內部成員用角色管理平台權限，跟 Agent 對話的終端使用者用聯絡人識別身分；說明兩者的定義、差異與選擇方式

MaiAgent 中有兩種「人」：**成員**是登入 MaiAgent 後台操作的帳號，權限由**角色**決定；**聯絡人**是跟 Agent 對話的終端使用者，不需要 MaiAgent 帳號。兩者各走各的機制，本頁說明差異與選擇方式。

## 兩種「人」的定義 <a href="#in-conversation-display" id="in-conversation-display"></a>

### 聯絡人 <a href="#contact-display" id="contact-display"></a>

聯絡人代表「跟 Agent 對話的終端使用者」：您網站上的訪客、會員系統的使用者、LINE 好友都是聯絡人。聯絡人不登入 MaiAgent，由系統在對話時自動建立，或由您的系統透過 API 建立，並以來源 ID（Source ID）對應到自家帳號。Agent 靠聯絡人認得「誰在問」，該使用者的對話歷史、自訂屬性、[查詢元資料](https://docs.maiagent.ai/org/querymetadata.md)（可查詢的知識範圍）與[工具憑證](https://docs.maiagent.ai/build/tools/setup-contacts-mcp-credentials.md)都掛在聯絡人上。

{% hint style="info" %}
欲了解聯絡人，請參考 [聯絡人](https://docs.maiagent.ai/serve/daily-operations/contact.md)
{% endhint %}

<figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-014415472288f559f650849304a7b45e5d2cb89d%2F%E6%88%AA%E5%9C%96%202025-07-07%20%E4%B8%8B%E5%8D%886.29.05.png?alt=media&amp;token=8ab63e75-b5e0-4652-b8fa-af4ad5960445" alt=""><figcaption><p>未設定聯絡人姓名：用戶預設為匿名</p></figcaption></figure>

### 角色 <a href="#role-display" id="role-display"></a>

角色是**成員的權限範本**：定義登入 MaiAgent 後台的成員可以使用哪些功能、存取哪些資源（Agent、知識庫、對話平台等）。企業可預先定義「客服人員」「行政人員」「實習生」等角色，成員加入組織時直接套用，不必逐人設定。被指派角色的人必須擁有 MaiAgent 帳號並加入組織。

<figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-3ee9233a19709cbeb9d408d978d2b331b2f8e898%2F%E6%88%AA%E5%9C%96%202025-07-07%20%E4%B8%8B%E5%8D%886.36.55.png?alt=media&amp;token=cffbc613-0d31-40e7-a501-88c9a878434c" alt=""><figcaption><p>成員基本資料中的角色設定</p></figcaption></figure>

{% hint style="info" %}
欲了解角色，請參考 [角色權限管理](https://docs.maiagent.ai/org/roles/role-permission.md)
{% endhint %}

## 權限方式對比 <a href="#permission-comparison" id="permission-comparison"></a>

<figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-bb81392bc29a9771001ca21c0572cd2a94c123fc%2F%E6%88%AA%E5%9C%96%202025-07-07%20%E4%B8%8B%E5%8D%886.32.19.png?alt=media&amp;token=487ad8e6-4005-440f-89fd-08eccbb81b99" alt=""><figcaption><p>Agent 嵌入畫面</p></figcaption></figure>

|        比較項目        |                 聯絡人                 |         角色        |
| :----------------: | :---------------------------------: | :---------------: |
|      🎯 **對象**     |          外部終端使用者（訪客、會員、客戶）          |    內部成員（員工、管理者）   |
| 👤 **MaiAgent 帳號** |                ❌ 不需要                |    ✅ 需要（成員登入平台）   |
|     📋 **建立方式**    |      對話時自動建立、API 建立、後台手動建立或批次匯入     |   後台預先定義角色，成員套用   |
|     🎯 **控制什麼**    | 該使用者的對話歷史、自訂屬性、可查詢的知識範圍（查詢元資料）、工具憑證 | 成員在後台的操作權限與資源存取範圍 |
|     ⚙️ **管理入口**    |           後台「聯絡人」或 API 串接           |     後台「角色權限管理」    |

## 知識範圍控制的分工 <a href="#knowledge-scope" id="knowledge-scope"></a>

兩者都能影響「查得到哪些知識」，但機制不同：

* **聯絡人**：在聯絡人上設定[查詢元資料](https://docs.maiagent.ai/org/querymetadata.md)，限制該使用者對話時 AI 可檢索的知識庫、文件與標籤範圍。
* **角色**：控制成員在平台內**看得到、管得到**哪些資源；成員在內部問答中，則可逐訊息選擇要參考的知識範圍。角色不是查詢元資料的設定層級。

## 典型應用場景 <a href="#typical-use-cases" id="typical-use-cases"></a>

**聯絡人使用情境：對外服務，依「誰在問」提供差異化內容**

* **企業官網**：訪客依身分獲得不同產品資訊
* **會員中心**：依等級存取對應服務內容
* **客服中心**：依客戶類型提供差異化支援

**角色使用情境：對內使用，依職責發放平台權限**

* **內部作業**：員工依部門角色處理工作
* **客服團隊**：依職責範圍查詢知識庫
* **管理階層**：依權限進行內容審核維護

## 綜合使用策略 <a href="#combined-strategy" id="combined-strategy"></a>

* **對外服務**（官網客服、會員中心、嵌入自家產品）：使用者不需要也不該有 MaiAgent 帳號，用**聯絡人**，依身分設定查詢元資料或自訂屬性做差異化。
* **對內使用**（員工用內部問答、團隊維運 Agent）：成員登入平台，用**角色**統一發放權限。
* 兩者可並存：同一個企業通常同時有「管後台的成員」與「跟 AI 對話的聯絡人」，各走各的機制，互不重疊。

<figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-53645aaed37bd279cd5330b940b591e287bba444%2Fimage.png?alt=media&amp;token=616096d5-fd57-40bd-8d9f-93965fe03155" alt=""><figcaption><p>聯絡人與角色授權使用建議</p></figcaption></figure>

{% hint style="info" %}
用 API 建立聯絡人、同步身分與工具憑證，請見技術人員手冊 [聯絡人 (Contact) 介紹及串接](https://docs.maiagent.ai/tech/serve/contacts)。
{% endhint %}


---

# 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.maiagent.ai/org/roles/contact-role-comparison.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.
