> For the complete documentation index, see [llms.txt](https://doc.nextbot.ru/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.nextbot.ru/functional/knowledge-base/gitbook.md).

# GitBook

Подключите GitBook к Nextbot, чтобы ИИ-Агент использовал его для подготовки ответов в диалоге.

{% hint style="info" %}
**GitBook** — это современная облачная платформа для создания, управления и публикации документации, технических руководств, баз знаний и корпоративных Wiki-систем.
{% endhint %}

Если у вас есть настроенный GitBook и вы хотите, чтобы ИИ-Агент запрашивал и получал информацию, содержащуюся в нём, вы можете подключить и настроить эту интеграцию в NEXTBOT.

После подключения интеграции, ИИ-Агент, получив запрос в диалоге, может найти информацию из GitBook, подготовить развёрнутый ответ и отправить его клиенту в ответ.

<h2 align="center">Как подключить</h2>

1. Перейдите в левое меню **Источники знаний -> GitBook**
2. Введите URL-адрес вашего **GitBook** и нажмите **СОХРАНИТЬ**
3. Если **Статус подключения** сменился на **Подключено,** значит подключение прошло успешно
4. В случае ошибки подключения, вы увидите соответствующее уведомление об ошибке

<figure><img src="https://2593311972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fef2EBU68XAlye1NtG8DF%2Fuploads%2FoDdxh6N2fAMCGipBTWhX%2Fimage.png?alt=media&amp;token=92a09fb0-59da-4456-a6f0-07d94a965cfc" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
**Рекомендация:**\
в случае, если ИИ-Агент игнорирует вопросы клиента и не всегда правильно понимает, когда он должен запросить информацию в GitBook, добавьте в промпт дополнительную инструкцию, например: `Если клиент задаёт вопрос, ты должен искать информацию в документации`
{% 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.nextbot.ru/functional/knowledge-base/gitbook.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
