> 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/getting-started/kak-nachat/sozdanie-agenta.md).

# Создание агента

В данной инструкции мы разберём создание ИИ-агента, но рассмотрим лишь самое **базовое использование**.

Это важный этап, который позволяет настроить помощника под ваши любые бизнес-задачи.

{% hint style="info" %}
**Подробнее про ИИ-агентов можно узнать** [**тут**](/functional/agents.md)
{% endhint %}

После регистрации, по умолчанию на вашем аккаунте будет один новый ИИ-агент.

<figure><img src="https://2593311972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fef2EBU68XAlye1NtG8DF%2Fuploads%2FlwoTj9Y0MhxhdehitqWt%2Fimage.png?alt=media&amp;token=87392572-37b6-45d1-9850-a834346757bc" alt=""><figcaption></figcaption></figure>

1. **Зайдём в его** [**настройки**](https://app.nextbot.ru/option)

{% hint style="info" %}
**Подробнее про все настройки ИИ-агента можно узнать** [**тут**](/functional/setting-up-agent.md)
{% endhint %}

2. **Добавим имя агенту и заполним небольшую тестовую инструкцию:**\
   (подробнее про системный промпт можно узнать в [статье](/functional/setting-up-agent/system-prompt.md))

<figure><img src="https://2593311972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fef2EBU68XAlye1NtG8DF%2Fuploads%2FaTNgyrdYOkHnTbZ2hNjA%2F%7B1E526496-9C3B-4CA6-A98A-4863A2EB1F76%7D.png?alt=media&amp;token=0c7bbb11-682c-46d2-b53b-cf57e54bd800" alt=""><figcaption></figcaption></figure>

3. **Перейдём в** [**окно чата**](https://app.nextbot.ru/chat) **и протестируем нашего бота:**<br>

<figure><img src="https://2593311972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fef2EBU68XAlye1NtG8DF%2Fuploads%2FIedhxBEdKqbk02Y1tpBO%2F%7B2862E063-B2EE-4420-9D6E-44828BCF6E8B%7D.png?alt=media&amp;token=f4717e3c-265e-4ffd-b472-a11e0a5f97b9" alt=""><figcaption></figcaption></figure>

4. **Работает!**

Но откуда он знает о наличии конкретного мяса в нашем магазине? А если спросить его о самовывозе? Или уточнить где находится наш магазин?<br>

5. **Давайте добавим в инструкцию эти данные:**<br>

<figure><img src="https://2593311972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fef2EBU68XAlye1NtG8DF%2Fuploads%2FH8aZCciQdK7TYZV67HH5%2F%7BF2503BA4-2260-424D-8B44-260856408289%7D.png?alt=media&amp;token=ad3c4239-6c53-4471-b235-575d29c935e7" alt=""><figcaption></figcaption></figure>

6. **Протестируем новую инструкцию из тестового чата:**\
   Отлично! ИИ-агент опирается на новые знание при ведении диалога.<br>

<figure><img src="https://2593311972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fef2EBU68XAlye1NtG8DF%2Fuploads%2FEYj113GhYMMNtSYu0dAu%2F%7B83FACD94-33D6-4B4C-BF9F-2EFD4AC27E01%7D.png?alt=media&amp;token=f60995e7-43d8-4d0f-b1ea-133a53fc1ab8" alt=""><figcaption></figcaption></figure>

7. **Далее мы вынесем некоторые данные в** [**Справочник**](/getting-started/kak-nachat/napolnenie-bazy-znanii.md)**, чтобы немного разгрузить память ИИ-агента.**

{% hint style="info" %}
После внесения изменений полезно протестировать ИИ-агента заново, для этого можно удалить всю историю переписки и начать заново.

Для этого в окне [**чат**](https://app.nextbot.ru/chat) используйте кнопку **"РЕСТАРТ ДИАЛОГА"** или введите команду **/restart**
{% endhint %}

## Видеоурок: Готовые шаблоны и гайд

Команда Nextbot подготовила видеоурок о шаблонах ИИ-агентов с пошаговым руководством по их внедрению в ваш бизнес.

**Посмотреть на YouTube:** <https://www.youtube.com/watch?v=izW8a2K2GQ0>\
**Посмотреть на Rutube:** <https://rutube.ru/video/8b0b061a15d418bffd8e7de816be7c10/>


---

# 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/getting-started/kak-nachat/sozdanie-agenta.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.
