> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/documentation/zh/gitbook-agent/channels.md).

# 渠道

{% hint style="warning" %}

#### 频道目前处于早期访问阶段

我们正在逐步开放对频道的访问。请持续关注下方功能的更多进展。
{% endhint %}

频道将 [GitBook Assistant](/docs/documentation/zh/wei-du-zhe-ti-gong-de-ai/gitbook-ai-assistant.md) 并 [GitBook 代理](/docs/documentation/zh/gitbook-agent/overview.md) 带入你们团队已经在使用的工具中。连接后，你们团队可以提及 `@GitBook` 在 Slack、GitHub 或 Linear 中提问、发起变更请求，并保持文档始终最新——无需离开现有工作流。

添加频道时，你可以选择 GitBook 在该工具中的显示方式。每个配置都会以两种模式之一运行：

**支持助手：** GitBook Assistant 会直接在频道中回答你团队成员或访客的问题。提出一个问题，即可获得从你的文档中提取的答案。在 Slack 中，这些回复里的引用会链接到所引用文档的已发布站点 URL。例如，被引用的答案会链接到你的文档站点，而不是 `app.gitbook.com`.

**协作者：** GitBook Agent 会作为团队成员加入。提及 `@GitBook` 即可发起变更请求、请求编辑，或让你的文档与该工具中的动态保持同步。在 Slack 中，消息可以链接到 `app.gitbook.com` 当它们引用内部工作流上下文时，例如变更请求或草稿内容。当 Agent 从频道创建变更请求时，它会自动将其关联到最初的线程、issue 或拉取请求。

你可以为同一频道运行多个配置——例如，在一个面向客户的 Slack 频道中使用支持助手模式，而在另一个用于文档团队的频道中使用协作者模式。

要添加频道，请打开你站点的 **设置** 并点击 **渠道**.

当支持问题、错误报告或产品反馈最先出现在 Slack、GitHub 或 Linear 中，并且你希望 GitBook 直接在原处回复时，请使用 Channels。

{% hint style="info" %}

#### 想将 GitBook Assistant 嵌入你的网站或产品中吗？

前往 [嵌入到你的产品中](/docs/documentation/zh/fa-bu/embedding.md) 了解如何嵌入 GitBook Assistant。
{% endhint %}

<figure><img src="/files/43eff20dc1926750d696cfff35500b0234f12f6f" alt=""><figcaption></figcaption></figure>

### 可用频道

<table data-view="cards"><thead><tr><th></th><th><select><option value="mjZVekTsgGQo" label="进行中" color="blue"></option><option value="exlMMXLVjkth" label="计划中" color="blue"></option><option value="WK4vEyJjJM8h" label="可用" color="blue"></option></select></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Slack</strong></td><td><span data-option="WK4vEyJjJM8h">可用</span></td><td></td><td></td></tr><tr><td><strong>Linear</strong></td><td><span data-option="WK4vEyJjJM8h">可用</span></td><td></td><td></td></tr><tr><td><strong>GitHub</strong></td><td><span data-option="WK4vEyJjJM8h">可用</span></td><td></td><td></td></tr></tbody></table>

### 即将推出

<table data-view="cards"><thead><tr><th></th><th><select><option value="mjZVekTsgGQo" label="进行中" color="blue"></option><option value="exlMMXLVjkth" label="计划中" color="blue"></option><option value="WK4vEyJjJM8h" label="可用" color="blue"></option></select></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Discord</strong></td><td><span data-option="exlMMXLVjkth">计划中</span></td><td></td><td></td></tr><tr><td><strong>Intercom</strong></td><td><span data-option="exlMMXLVjkth">计划中</span></td><td></td><td></td></tr><tr><td><strong>Microsoft Teams</strong></td><td><span data-option="exlMMXLVjkth">计划中</span></td><td></td><td></td></tr><tr><td><strong>Google Chat</strong></td><td><span data-option="exlMMXLVjkth">计划中</span></td><td></td><td></td></tr><tr><td><strong>请求频道</strong></td><td></td><td><i class="fa-arrow-up-right-from-square">:arrow-up-right-from-square:</i></td><td><a href="https://github.com/orgs/GitbookIO/discussions/new?category=feature-requests">https://github.com/orgs/GitbookIO/discussions/new?category=feature-requests</a></td></tr></tbody></table>

### 概览

频道将 GitBook 连接到外部工作流。

它们让你可以：

* 无需离开源对话即可回答问题。
* 将现有文档上下文带入支持和产品工作流。
* 将重要对话通过 [GitBook 代理](/docs/documentation/zh/gitbook-agent/overview.md).

当对话从 GitBook 外部开始，但答案或后续处理应归入你的文档流程时，请使用 Channels。

### 支持的平台

频道目前支持以下平台：

* **Slack** 用于对话和支持线程。
* **GitHub** 用于 issue、拉取请求上下文和讨论工作流。
* **Linear** 用于问题跟踪和产品反馈工作流。

每个平台都使用相同的核心模型。

GitBook 会接收来自已连接平台的受支持事件，从你的知识库中收集上下文，并通过以下方式响应： [GitBook Assistant](/docs/documentation/zh/wei-du-zhe-ti-gong-de-ai/gitbook-ai-assistant.md) 或者 [GitBook 代理](/docs/documentation/zh/gitbook-agent/overview.md).

### 角色和权限

频道支持两种角色：

* **协作者** ——可进行更改。
* **支持助手** ——提供只读信息。

请根据频道需要完成的工作选择相应角色。

#### 协作者

使用 **协作者** 当频道需要帮助把对话转化为文档工作时。

协作者频道可以使用 GitBook Agent，在 GitBook 中帮助创建或更新文档工作，例如发起或推进变更请求。

#### 支持助手

使用 **支持助手** 当频道只需要回答问题时。

支持助手频道使用现有文档和已连接的知识，以只读上下文进行回复。它不会更改内容。

### 运作方式

频道会处理来自已连接平台的传入事件。

传入事件可以是 Slack、GitHub 或 Linear 中的新消息、提及、issue 更新或其他受支持活动。

GitBook 会分四步处理这些事件：

{% stepper %}
{% step %}

### 接收事件

已连接的平台会通过你安装的频道向 GitBook 发送受支持的事件。
{% endstep %}

{% step %}

### 收集上下文

GitBook 会查找相关的文档上下文以及站点可用的其他知识。
{% endstep %}

{% step %}

### 应用频道角色

如果频道是 **支持助手**，GitBook 会返回只读信息。

如果频道是 **协作者**，GitBook 还可以通过 GitBook Agent 将对话转化为文档工作。
{% endstep %}

{% step %}

### 在源工具中回复

回复会回到 Slack、GitHub 或 Linear 中，因此工作流始终留在一个地方。
{% endstep %}
{% endstepper %}

{% hint style="info" %}
确切的事件覆盖范围取决于平台以及你的早期访问开放进度。如果某个触发器在你的工作区中尚不可用，则它尚未公开记录。
{% endhint %}

### 安装与授权

要安装频道，请打开你的站点仪表盘并选择 **设置** → **渠道**.

然后选择你要连接的平台。

每个平台都使用 OAuth 或应用安装流程。GitBook 会将你带到平台，你批准访问，然后返回 GitBook 完成设置。

{% hint style="warning" %}
各平台特定的权限范围和管理员要求目前尚未完全记录。

在批准访问之前，请仔细检查授权屏幕。
{% endhint %}

{% tabs %}
{% tab title="Slack" %}
{% stepper %}
{% step %}

### 开始安装

在 **设置** → **渠道**，选择 **Slack**.
{% endstep %}

{% step %}

### 授权 Slack

如有需要，请登录 Slack。

然后选择你要安装频道的 Slack 工作区，并批准所请求的访问权限。
{% endstep %}

{% step %}

### 在 GitBook 中完成设置

Slack 重定向回来后，在 GitBook 中完成频道设置。

选择频道应使用的角色并保存配置。
{% endstep %}
{% endstepper %}
{% endtab %}

{% tab title="GitHub" %}
{% stepper %}
{% step %}

### 开始安装

在 **设置** → **渠道**，选择 **GitHub**.
{% endstep %}

{% step %}

### 授权 GitHub

如有需要，请登录 GitHub。

然后选择你要安装 GitBook 应用的个人账户或组织，并批准所请求的访问权限。
{% endstep %}

{% step %}

### 在 GitBook 中完成设置

GitHub 重定向回来后，在 GitBook 中完成频道设置。

选择频道应使用的角色并保存配置。
{% endstep %}
{% endstepper %}
{% endtab %}

{% tab title="Linear" %}
{% stepper %}
{% step %}

### 开始安装

在 **设置** → **渠道**，选择 **Linear**.
{% endstep %}

{% step %}

### 授权 Linear

如有需要，请登录 Linear。

然后选择你要连接的 Linear 工作区并批准所请求的访问权限。
{% endstep %}

{% step %}

### 在 GitBook 中完成设置

Linear 重定向回来后，在 GitBook 中完成频道设置。

选择频道应使用的角色并保存配置。
{% endstep %}
{% endstepper %}
{% endtab %}
{% endtabs %}

### 反馈与反应

反应让你的团队可以对频道回复提供快速反馈。

当你想表达某个回复是否有帮助时，请使用反应。

这些反馈有助于 GitBook 了解哪些回复在真实工作流中表现良好。

{% hint style="info" %}
确切的反应映射尚未记录，并且在早期访问阶段可能因平台而异。
{% 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 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://gitbook.com/docs/documentation/zh/gitbook-agent/channels.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.
