> 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/ja-gitbook-documentation/getting-started/ai-documentation.md).

# AI で構築する

GitBookのドキュメントをAIで作成する方法は、さまざまな環境で使えます。ローカルのリポジトリ内、CIワークフロー内、またはAIエージェントを介して直接行えます。公開されたサイトには、デフォルトでAIに適した出力が含まれ、プランに応じて対話型のAI機能も利用できます。

## AIワークフローを選択

AIコーディングアシスタントやエージェントにコンテンツの作成や管理を手伝ってもらいたい場合、GitBookでは作業場所に応じたオプションを用意しています：

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="image">カバー画像</th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover-dark data-type="image">カバー画像（ダーク）</th></tr></thead><tbody><tr><td><strong>AIでローカルに構築</strong></td><td>GitBookのルールに従うAIコーディングアシスタントを使って、リポジトリ内で作業します。</td><td><a href="/files/45b401c890b68e6523ca18562d6e156b094f9f9c">/files/45b401c890b68e6523ca18562d6e156b094f9f9c</a></td><td><a href="/pages/12ec393b56534f5869c4957ea13f79584aa511ad">/pages/12ec393b56534f5869c4957ea13f79584aa511ad</a></td><td><a href="/files/516a59a1f9b398d86eaa8792abbee306a6b05fe1">/files/516a59a1f9b398d86eaa8792abbee306a6b05fe1</a></td></tr><tr><td><strong>MCPで構築</strong></td><td>AIエージェントをGitBookのAPIに接続して、ドキュメントの作成、編集、管理を任せましょう。</td><td><a href="/files/789f668ed60871277aebe6d0c713b094fb73163b">/files/789f668ed60871277aebe6d0c713b094fb73163b</a></td><td><a href="/pages/98969ccc8e2a5792b969687905dd77255b66c62b">/pages/98969ccc8e2a5792b969687905dd77255b66c62b</a></td><td><a href="/files/0d83f38a9eb2e885f9dafcba1204422afff3c393">/files/0d83f38a9eb2e885f9dafcba1204422afff3c393</a></td></tr><tr><td><strong>GitBook Agentで構築</strong></td><td>GitBookのAIを使って、エディタ内で直接変更を加えます。</td><td><a href="/files/7cdbaf9b320ad8f079d79206d84fc55361db7eb7">/files/7cdbaf9b320ad8f079d79206d84fc55361db7eb7</a></td><td><a href="/pages/cd2d7f40e67dad16af61958bb7d1d094c6e01265">/pages/cd2d7f40e67dad16af61958bb7d1d094c6e01265</a></td><td><a href="/files/9424c295392caa9ae4e4d79aaa7dc503f523279b">/files/9424c295392caa9ae4e4d79aaa7dc503f523279b</a></td></tr></tbody></table>

## 公開済みドキュメントをAIツールに接続する

公開すると、ドキュメントはClaude、Codex、Cursor、Copilot、GitBook AssistantのようなAIツールが読み取れる状態になります。

<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><h4><i class="fa-gitbook-assistant">:gitbook-assistant:</i></h4></td><td><strong>GitBook Assistant</strong></td><td>読者が、サイト上または製品に埋め込んだ形で、ドキュメントから素早く文脈に合った回答を得られるようにします。</td><td><a href="/pages/d74007c5891dbdec7feb5c3c8732f5a684aa5e91">/pages/d74007c5891dbdec7feb5c3c8732f5a684aa5e91</a></td></tr><tr><td><h4><i class="fa-mcp">:mcp:</i></h4></td><td><strong>公開済みドキュメント向けMCP</strong></td><td>外部のAIツールが、サイトのMCPサーバーを通じて公開済みドキュメントに直接接続できるようにします。</td><td><a href="/pages/64e124c96c6789fbf2b7181db00b7a3d230421e1">/pages/64e124c96c6789fbf2b7181db00b7a3d230421e1</a></td></tr><tr><td><h4><i class="fa-sparkles">:sparkles:</i></h4></td><td><strong>LLM対応ドキュメント</strong></td><td>GitBookが、公開済みドキュメントをAIツールが見つけ、読み取り、利用しやすくする仕組みをご覧ください。</td><td><a href="/pages/5ffcf005b570878267263559305e0b44af9af798">/pages/5ffcf005b570878267263559305e0b44af9af798</a></td></tr></tbody></table>


---

# 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/ja-gitbook-documentation/getting-started/ai-documentation.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.
