# GitBook Assistant

<figure><img src="/files/88ec79649ec7c356cd9629fdafa2276e7302f3f5" alt="GitBook Assistant"><figcaption><p>GitBook アシスタント</p></figcaption></figure>

GitBook Assistant は、自然言語を使ってドキュメントに関する正確で迅速な回答をユーザーに提供します。ユーザーごとに最適化され、Webサイトや製品に埋め込むことができ、公開済みドキュメントのサイドバーでも利用できます。

これは、必要な場所とタイミングでいつでも利用できる、すべてのユーザー向けの製品エキスパートのようなものだと考えてください。

Assistant はエージェント型検索を使用して、ユーザーの現在のページ、以前に読んだページ、および過去の会話に基づいて、クエリの文脈を理解します。

下のボックスで Assistant に質問してみてください:

<p align="center"><button type="button" class="button primary" data-action="ask" data-icon="gitbook-assistant">質問を入力...</button></p>

## GitBook Assistant を有効にする <a href="#how-do-i-use-gitbook-ai" id="how-do-i-use-gitbook-ai"></a>

GitBook Assistant を有効にするには、サイトのダッシュボードを開き、 **設定** ページに移動して、左側のメニューから **AI と MCP** を選択します。ここで利用可能なオプションから GitBook Assistant を有効にできます。

### 提案質問を追加する

提案質問とは、Assistant がアクティブな会話なしで開いたときに表示される、あらかじめ用意されたプロンプトです。ユーザーが何を質問できるかを理解するのに役立ち、ユーザーを有用な回答やワークフローへ導くのにも役立ちます。

サイトの **設定**に提案質問を追加できます。 **AI と MCP** セクション内で選択します。

#### **提案質問のベストプラクティス:**

* 実際のユーザーの目的（セットアップ、トラブルシューティング、連携）から始める。
* ユーザーが使う言葉を使う（内部コードネームは避ける）。
* 具体的にする。「How do I…?」は「Tell me about…」より適しています。
* さまざまな意図をカバーする: クイックスタート、使い方、トラブルシューティング、リファレンス。

{% hint style="info" %}
Assistant を製品に埋め込む場合は、埋め込み設定で提案を動的に設定することもできます。参照: [Embed のカスタマイズ](/docs/docs-site/embedding/configuration/customizing-docs-embed.md#adding-suggestions).
{% endhint %}

## 公開済みドキュメントで GitBook Assistant を使用する <a href="#how-do-i-use-gitbook-ai" id="how-do-i-use-gitbook-ai"></a>

ユーザーは GitBook Assistant に 3 つの方法でアクセスできます:

* を押す <kbd>⌘</kbd> + <kbd>I</kbd> Macでは、または <kbd>Ctrl</kbd> + <kbd>I</kbd> PC で
* 次のボタンをクリックします **GitBook Assistant** <picture><source srcset="/files/KOSE771IpEtAlfLNdKX1" media="(prefers-color-scheme: dark)"><img src="/files/ad2de5ee4a387c893e0b483fa46ca02f60c7f628" alt=""></picture> ボタンの横にある **質問するか検索…** バー
* 質問を **質問するか検索…** バーに入力し、メニュー上部の「Ask…」オプションを選択します

## GitBook Assistant を製品に埋め込む

GitBook Assistant を製品や Webサイトに直接埋め込むことで、ユーザーはアプリケーションを離れることなく AI 搭載のヘルプにすぐアクセスできます。Assistant は、の一部として埋め込むことができます。 [Docs Embed](/docs/documentation/ja-gitbook-documentation/docs-site/embedding.md)。これには、AI 搭載チャット用の Assistant タブと、ドキュメントを閲覧するための Docs タブの両方が含まれます。

スタックに合った埋め込み方法を選択してください:

* [**単独の script タグ**](/docs/documentation/ja-gitbook-documentation/docs-site/embedding/implementation/script.md) – を使った簡単なセットアップ `<script>` タグ
* [**Node.js/NPM**](/docs/documentation/ja-gitbook-documentation/docs-site/embedding/implementation/nodejs.md) – サーバーサイドまたはビルド時の統合
* [**React コンポーネント**](/docs/documentation/ja-gitbook-documentation/docs-site/embedding/implementation/react.md) – 事前構築済みの React コンポーネント

### 追加の Assistant 埋め込みガイド:

* [認証済みドキュメントで埋め込み Assistant を使用する](/docs/documentation/ja-gitbook-documentation/docs-site/embedding/using-with-authenticated-docs.md) – ドキュメントへのサインインが必要な場合に必須
* [Assistant の埋め込みをカスタマイズする](/docs/documentation/ja-gitbook-documentation/docs-site/embedding/configuration/customizing-docs-embed.md) – ウェルカムメッセージ、アクション、提案
* [カスタム埋め込みツールを作成する](/docs/documentation/ja-gitbook-documentation/docs-site/embedding/configuration/creating-custom-tools.md) – Assistant を API に接続する
* [API リファレンス](/docs/documentation/ja-gitbook-documentation/docs-site/embedding/configuration/reference.md) – 利用可能なすべてのメソッドとイベント

## GitBook Assistant の知識を拡張する

GitBook Assistant は、 [接続](/docs/ai-and-search/connections.md) 、 [MCP サーバー](/docs/documentation/ja-gitbook-documentation/ai-to/mcp-servers-for-published-docs.md).

を通じて外部知識を利用できます。GitBook にレコードをサイトへ同期させたい場合は接続を、GitBook Assistant をカスタムツールに接続したい場合は MCP サーバーを使用できます。

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th>最適な用途</th></tr></thead><tbody><tr><td><strong>接続</strong></td><td><p>接続は、コンテンツ量の多いソースに最適です:</p><ul><li>GitHub の issue とディスカッション</li><li>Slack または Discord の会話</li><li>サポートコンテンツ</li><li>外部ドキュメント、ヘルプセンター、Webサイト</li></ul></td></tr><tr><td><strong>MCP サーバー</strong></td><td><p>MCP サーバーは、ライブツールやデータに最適です:</p><ul><li>現在のアカウントまたは製品の状態</li><li>頻繁に変更される社内システム</li><li>チケット作成やバグ報告などのアクション</li><li>GitBook に同期したくないソース</li></ul></td></tr></tbody></table>

{% tabs %}
{% tab title="接続を追加する" %}
{% stepper %}
{% step %}
**サイトの設定を開く**

サイトのダッシュボードを開きます。次に **設定** → **接続**.
{% endstep %}

{% step %}
**ソースを接続**

を選択します。ソースの種類を選択し、認証するか、インポートする URL を入力します。
{% endstep %}

{% step %}
**レコードを GitBook Assistant に公開する**

をオンにする **検索 / アシスタントに公開** を接続に対して有効にします。

その後、GitBook はそれらのレコードを検索と GitBook Assistant で使用できます。
{% endstep %}
{% endstepper %}
{% endtab %}

{% tab title="MCP サーバーを追加する" %}
{% stepper %}
{% step %}
**サイトの設定を開く**

サイトのダッシュボードを開きます。次に **設定** → **AI と MCP**.
{% endstep %}

{% step %}
**新しいサーバーを追加する**

MCP サーバーのテーブルで **MCP サーバーを追加**.
{% endstep %}

{% step %}
**サーバーの詳細を入力する**

サーバーに名前を付けます。URL を追加します。

その後、各リクエストで GitBook が送信する必要のある HTTP ヘッダーを設定します。
{% endstep %}
{% endstepper %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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:

```
GET https://gitbook.com/docs/documentation/ja-gitbook-documentation/ai-to/gitbook-ai-assistant.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
