> 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/integrations/telegram/podklyuchenie/chat-bot.md).

# Чат-бот

Подключение чат-бота к ИИ-Агенту вручную и при помощи мастера подключения

**Чат-бот** — этот тип подключения позволяет связать ИИ-агента с Telegram-ботом. Бот может принимать и отправлять сообщения **только в личных диалогах** с пользователями. Подключение выполняется быстро и не требует дополнительных настроек перед запуском.

## Подключения чат бота вручную:

1. Перейдите по [ссылке](https://telegram.me/BotFather) и вставьте команду <kbd>/newbot</kbd>. Eсли у вас уже есть бот вставьте команду `/mybots` выберите нужного бота и следуйте пункту 3.
2. Задайте имя боту
3. Скопируйте HTTP API ключ

<div align="left"><figure><img src="https://2593311972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fef2EBU68XAlye1NtG8DF%2Fuploads%2FK1AP7BEAEXl8OZt9uFs8%2Fimage.png?alt=media&amp;token=300f6340-d83e-422b-940f-09605cf8bcee" alt=""><figcaption></figcaption></figure></div>

4. Вставьте ключ в поле на странице интеграции

<figure><img src="https://2593311972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fef2EBU68XAlye1NtG8DF%2Fuploads%2FIvTBDyxpaPjzRttBE1De%2Fimage.png?alt=media&amp;token=ca577aff-2712-4ea2-a378-bf02c1347cb6" alt=""><figcaption></figcaption></figure>

5. Нажмите на кнопку подключить
6. Готово! 🎉\
   Теперь вы можете использовать Telegram-бота как канал связи и получать сообщения от пользователей в личных сообщениях бота.

#### Также вы можете подключить интеграцию при помощи [Мастера подключений](/functional/integrations/telegram/instrukciya-dlya-podklyucheniya-telegram-cherez-master-podklyuchenii.md)


---

# 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/integrations/telegram/podklyuchenie/chat-bot.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.
