> 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/maiagent-user-guide/en/org/roles/contact-role-comparison.md). Agents can also search and read this documentation through its [MCP server](https://docs.maiagent.ai/~gitbook/mcp).

# Differences Between Roles and Contacts

Internal members use roles to manage platform permissions, while end users who chat with an Agent are identified as contacts; this page explains the definitions, differences, and how to choose between

MaiAgent has two kinds of "people": **Members** are accounts that log in to the MaiAgent back office, and their permissions are determined by **roles**; **Contacts** are end users who chat with an Agent and do not need a MaiAgent account. The two work through separate mechanisms. This page explains the differences and how to choose between them.

## Definitions of the Two Kinds of "People" <a href="#in-conversation-display" id="in-conversation-display"></a>

### Contact <a href="#contact-display" id="contact-display"></a>

A contact represents an "end user who chats with an Agent": visitors to your website, users of your membership system, and LINE friends are all contacts. Contacts do not log in to MaiAgent. They are created automatically by the system during a conversation, or created by your system through the API, and are mapped to your own accounts through a Source ID. The Agent relies on the contact to know "who is asking"; that user's conversation history, custom attributes, [query metadata](https://docs.maiagent.ai/maiagent-user-guide/en/org/querymetadata.md) (the scope of knowledge that can be queried), and [tool credentials](https://docs.maiagent.ai/maiagent-user-guide/en/build/tools/setup-contacts-mcp-credentials.md) are all attached to the contact.

{% hint style="info" %}
To learn more about contacts, see [Contacts](https://docs.maiagent.ai/maiagent-user-guide/en/serve/daily-operations/contact.md)
{% endhint %}

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%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" alt=""><figcaption><p>Contact name not set: the user defaults to anonymous</p></figcaption></figure>

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

A role is a **permission template for members**: it defines which features members who log in to the MaiAgent back office can use and which resources they can access (Agents, knowledge bases, messaging platforms, and so on). Enterprises can predefine roles such as "customer service agent," "administrative staff," and "intern," and apply them directly when members join the organization instead of configuring each person individually. Anyone assigned a role must have a MaiAgent account and be a member of the organization.

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%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" alt=""><figcaption><p>Role setting in a member's profile</p></figcaption></figure>

{% hint style="info" %}
To learn more about roles, see [Role Permission Management](https://docs.maiagent.ai/maiagent-user-guide/en/org/roles/role-permission.md)
{% endhint %}

## Permission Approach Comparison <a href="#permission-comparison" id="permission-comparison"></a>

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%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" alt=""><figcaption><p>Agent embedded view</p></figcaption></figure>

|           Comparison          |                                                        Contact                                                       |                                     Role                                    |
| :---------------------------: | :------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------: |
|        🎯 **Audience**        |                                   External end users (visitors, members, customers)                                  |                 Internal members (employees, administrators)                |
|    👤 **MaiAgent account**    |                                                    ❌ Not required                                                    |                 ✅ Required (members log in to the platform)                 |
|       📋 **How created**      |       Created automatically during a conversation, via the API, manually in the back office, or by bulk import       |        Roles are predefined in the back office and applied to members       |
|    🎯 **What it controls**    | The user's conversation history, custom attributes, queryable knowledge scope (query metadata), and tool credentials | Members' operation permissions and resource access scope in the back office |
| ⚙️ **Management entry point** |                                   "Contacts" in the back office or API integration                                   |               "Role Permission Management" in the back office               |

## Division of Responsibilities for Knowledge Scope Control <a href="#knowledge-scope" id="knowledge-scope"></a>

Both can affect "which knowledge can be found," but through different mechanisms:

* **Contact**: Set [query metadata](https://docs.maiagent.ai/maiagent-user-guide/en/org/querymetadata.md) on the contact to limit the knowledge bases, documents, and tags the AI can retrieve when chatting with that user.
* **Role**: Controls which resources a member can **see and manage** on the platform; in internal Q\&A, members can also choose the knowledge scope to reference for each message. A role is not a level at which query metadata is configured.

## Typical Use Cases <a href="#typical-use-cases" id="typical-use-cases"></a>

**Contact use case: external services that provide differentiated content based on "who is asking"**

* **Corporate website**: Visitors receive different product information based on their identity
* **Member center**: Access the corresponding service content based on membership tier
* **Customer service center**: Provide differentiated support based on customer type

**Role use case: internal use that grants platform permissions based on responsibilities**

* **Internal operations**: Employees handle work according to their department role
* **Customer service team**: Query the knowledge base according to their scope of responsibility
* **Management**: Review and maintain content according to their permissions

## Combined Usage Strategy <a href="#combined-strategy" id="combined-strategy"></a>

* **External services** (website customer service, member center, embedding in your own product): Users do not need and should not have a MaiAgent account. Use **contacts**, and set query metadata or custom attributes by identity to provide differentiated experiences.
* **Internal use** (employees using internal Q\&A, teams operating and maintaining Agents): Members log in to the platform. Use **roles** to grant permissions uniformly.
* The two can coexist: an enterprise usually has both "members who manage the back office" and "contacts who chat with the AI," each working through its own mechanism without overlap.

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-53645aaed37bd279cd5330b940b591e287bba444%2Fimage%20(1).png?alt=media" alt=""><figcaption><p>Recommendations for using contacts and role authorization</p></figcaption></figure>

{% hint style="info" %}
To create contacts through the API and synchronize identities and tool credentials, see the technical manual [Contacts Introduction and Integration](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/maiagent-user-guide/en/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.
