> 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" %}

#### Channels 目前处于早期访问阶段

我们正在逐步开放对 Channels 的访问权限。请继续关注以下功能的进展。
{% endhint %}

{% hint style="info" %}
此功能可在 [终极站点方案](https://www.gitbook.com/pricing).
{% endhint %}

Channels 将 [GitBook Assistant](/docs/documentation/zh/ai-yu-sou-suo/gitbook-ai-assistant.md) 和 [GitBook Agent](/docs/documentation/zh/gitbook-agent/what-is-gitbook-agent.md) 带入你的团队已经在使用的工具中。连接后，你的团队可以提及 `@GitBook` 在 Slack、GitHub 或 Linear 中提问、创建变更请求，并保持文档更新——无需离开现有工作流。

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

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

**协作者：** GitBook Agent 会作为队友加入。提及 `@GitBook` 以创建变更请求、请求编辑，或让你的文档与该工具中的动态保持同步。在 Slack 中，消息可以链接到 `app.gitbook.com` 当它们引用内部工作流上下文时，例如变更请求或草稿内容。当 Agent 从频道创建变更请求时，它会自动将其链接到原始讨论串、议题或拉取请求。

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

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

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

{% hint style="info" %}

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

前往 [嵌入到你的产品中](/docs/documentation/zh/docs-site/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>

### 概览

Channels 将 GitBook 连接到外部工作流。

它们可让你：

* 无需离开原始对话即可回答问题。
* 将现有文档上下文带入支持和产品工作流。
* 借助 [GitBook Agent](/docs/documentation/zh/gitbook-agent/what-is-gitbook-agent.md).

当对话开始于 GitBook 之外，但答案或后续跟进应纳入你的文档流程时，请使用 Channels。

### 支持的平台

Channels 目前支持以下平台：

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

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

GitBook 从已连接的平台接收受支持的事件，收集你的知识库中的上下文，并通过以下任一方式回复： [GitBook Assistant](/docs/documentation/zh/ai-yu-sou-suo/gitbook-ai-assistant.md) 或 [GitBook Agent](/docs/documentation/zh/gitbook-agent/what-is-gitbook-agent.md).

### 角色和权限

Channels 支持两种角色：

* **协作者** — 可以进行更改。
* **支持代理** — 提供只读信息。

根据频道需要执行的操作选择角色。

#### 协作者

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

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

#### 支持代理

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

支持代理频道会使用现有文档和连接的知识来提供只读上下文回复，不会修改内容。

### 工作原理

Channels 处理来自已连接平台的传入事件。

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

GitBook 通过四个步骤处理这些事件：

{% stepper %}
{% step %}

### 接收事件

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

{% step %}

### 收集上下文

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

{% step %}

### 应用频道角色

如果该频道是 **支持代理**，GitBook 会返回只读信息。

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

{% step %}

### 在源工具中回复

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

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

### 安装与授权

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

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

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

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

在批准访问前，请仔细查看授权界面。
{% endhint %}

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

### 开始安装

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

{% step %}

### 授权 Slack

如有需要，请登录 Slack。

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

{% step %}

### 在 GitBook 中完成设置

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

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

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

### 开始安装

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

{% step %}

### 授权 GitHub

如有需要，请登录 GitHub。

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

{% step %}

### 在 GitBook 中完成设置

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

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

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

### 开始安装

在 **设置** → **Channels**，选择 **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.
