# 製品に埋め込む

Docs Embed は、製品知識への強力なウィンドウであり、あらゆる製品やウェブサイトに追加できます。ユーザーはに質問できます [GitBook Assistant](/docs/documentation/ja-gitbook-documentation/ai-to/gitbook-ai-assistant.md)へ、製品から離れることなく、ドキュメントを検索したり、ページを直接閲覧したりできます。埋め込みはボタンで開くことも、任意のコンポーネントに配置することも、完全にプログラムで制御することもできます。

<div data-with-frame="true"><figure><img src="/files/50eddda662ec666a3cc02b333b1885382b23fc4c" alt="Embed GitBook Assistant into your product or website"><figcaption><p>ドキュメントを製品やウェブサイトに埋め込む</p></figcaption></figure></div>

## 概要

Docs Embed には3つのタブを含めることができます:

* **アシスタント**： [GitBook Assistant](/docs/documentation/ja-gitbook-documentation/ai-to/gitbook-ai-assistant.md) - ユーザーが回答を見つけるのを支援する、AI 搭載のチャットインターフェース
* **検索**：ページをすばやく見つけたり、対象を絞った質問をしたりするための検索中心の画面
* **ドキュメント**：ドキュメントサイトを移動するためのブラウザー

すべてのタブはデフォルトで有効です。 `tabs`を設定すると、埋め込みにはリストしたタブのみが表示されます。

カスタムアクション、ツール、提案質問、 [認証済みアクセス](/docs/documentation/ja-gitbook-documentation/saitoakusesu/authenticated-access.md)などを使って、デフォルトの設定をカスタマイズし、上書きできます。

## はじめに

{% stepper %}
{% step %}
**前提条件**

ドキュメントを埋め込む前に、次を確認してください:

1. **ドキュメントが公開されている** こと、および URL でアクセスできること（例： `https://docs.company.com`).
2. **埋め込みスクリプトの URL を取得している** こと（サイト設定 → AI & MCP → Embed から）。

{% hint style="info" %}
アシスタントタブを使用したい場合は、 [GitBook Assistant を有効にする必要があります](/docs/documentation/ja-gitbook-documentation/ai-to/gitbook-ai-assistant.md) ドキュメントサイトで（設定 → AI & MCP）。
{% endhint %}
{% endstep %}

{% step %}
**実装**

既存のスタックを使って、GitBook Assistant を製品にすばやく実装するには、当社のスキルを使用してください。

{% file src="/files/e598c82cf1e0ddfb459a241b4284058a74c255f5" %}

または、セットアップに合った方法について、次のドキュメントを読み進めてください:

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><i class="fa-code">:code:</i></td><td><strong>スタンドアロンの script タグ</strong></td><td>最速のセットアップのために &#x3C;script> タグを追加し、その後外観をカスタマイズします</td><td><a href="/pages/030bd959f78b065716d2f9c0dcc1a2879303f264">/pages/030bd959f78b065716d2f9c0dcc1a2879303f264</a></td></tr><tr><td><i class="fa-box">:box:</i></td><td><strong>Node.js/NPM</strong></td><td>サーバーサイドレンダリングまたはビルド時の制御のために NPM 経由でインストールします</td><td><a href="/pages/8e0e4b951aef9ebc102ed130b49ba602869edd2d">/pages/8e0e4b951aef9ebc102ed130b49ba602869edd2d</a></td></tr><tr><td><i class="fa-react">:react:</i></td><td><strong>React コンポーネント</strong></td><td>シームレスに統合するために、事前構築済みの React コンポーネントを使用します</td><td><a href="/pages/7523be88446dd47728c7b82cae494686c5fe27d2">/pages/7523be88446dd47728c7b82cae494686c5fe27d2</a></td></tr></tbody></table>

{% hint style="info" %}
ドキュメントで [認証済みアクセス](/docs/documentation/ja-gitbook-documentation/saitoakusesu/authenticated-access.md)を使用している場合は、 [認証済みドキュメントでの埋め込みの設定方法](/docs/documentation/ja-gitbook-documentation/docs-site/embedding/using-with-authenticated-docs.md).
{% endhint %}
{% endstep %}

{% step %}
**設定**

* [埋め込みのカスタマイズ](/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 に接続します
  {% endstep %}
  {% endstepper %}

## さらに読む

完全な API リファレンスとソースコードについては、 [`@gitbook/embed` の GitHub 上のパッケージを参照してください](https://github.com/GitbookIO/gitbook/tree/main/packages/embed).


---

# 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/docs-site/embedding.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.
