> For the complete documentation index, see [llms.txt](https://doc.firstbot.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.firstbot.tech/engine/bots/bot-configurations.md).

# Bot configurations

## 1. Configurations

<figure><img src="https://912666480-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FulIQiFZkpFd5li7rHZ8c%2Fuploads%2F8EoJT8eFw5SCkLGpUqqd%2Fimage.png?alt=media&amp;token=39778ce5-9783-42a3-8a52-b3cc0b4af5bf" alt=""><figcaption><p>Bot Configurations</p></figcaption></figure>

### Basic&#x20;

<table data-header-hidden><thead><tr><th width="229"></th><th></th></tr></thead><tbody><tr><td>Prompt</td><td><p>Define the prompt (instructions) that will guide the AI agent's behavior and responses. The prompt can include specific instructions, context information, and any other relevant details to help the agent understand the user's intent and provide accurate and relevant responses.</p><p>More tips on prompt writing in the<a href="/engine/bots.md"> Bots Section</a>.</p></td></tr></tbody></table>

### Advanced&#x20;

<table data-header-hidden><thead><tr><th width="230"></th><th></th></tr></thead><tbody><tr><td>Upload Logo</td><td><p><strong>Format requirements: 1024 x 1024, .jpg, .png, 1MB max</strong></p><p>Upload an image that will be associated with your AI servant or bot</p></td></tr><tr><td>Title</td><td>Name or title for your AI bot will be automatically derived from yout prompt. <br>Alternatively, you can give your bot your own name. </td></tr><tr><td>Fault tolerance</td><td>Maximum amount of errors accumilated, will replenish after the function returns a correct response. <br>Set to 0 by default. </td></tr><tr><td>Auto retry </td><td>Number of attemts to retry a function after a singular error. <br>Set to 0 by default. </td></tr><tr><td>Number of output per request </td><td>Number of results the LLM generates from a single input. <br>Set to 1 by default. </td></tr></tbody></table>

<table data-header-hidden><thead><tr><th width="230"></th><th></th></tr></thead><tbody><tr><td>Image</td><td><p><strong>Format requirements: 1024 x 1024, .jpg, .png, 1MB max</strong></p><p>Upload an image that will be associated with your AI servant or bot</p></td></tr><tr><td>Servant type</td><td><ul><li>Cutom: using RAG mechanism of Firstbot</li><li>Open AI Assistant: using Open AI RAG mechanism </li><li>Template: using template RAG mechanism </li></ul></td></tr><tr><td>Title</td><td>Name or title for your AI bot. </td></tr><tr><td>Fault tolerance</td><td>Maximum amount of errors accumilated, will replenish after the function returns a correct response. <br>Set to 0 by default. </td></tr><tr><td>Auto retry </td><td>Number of attemts to retry a function after a singular error. <br>Set to 0 by default. </td></tr><tr><td>Number of output per request </td><td>Number of results the LLM generates from a single input. <br>Set to 1 by default. </td></tr></tbody></table>

## 2. AI Model&#x20;

When configuring your bot, you'll need to select a suitable AI model to power its intelligence and capabilities. Generally, you'll want to choose an AI model that best aligns with the intended purpose and use case of your bot.&#x20;

<figure><img src="https://912666480-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FulIQiFZkpFd5li7rHZ8c%2Fuploads%2FUpcGSNeWz9TgceE6D3pp%2Fimage.png?alt=media&amp;token=d32d9566-4b58-4789-83c5-dc9ab18b54fe" alt=""><figcaption><p>Bot Cofigurations - AI Model</p></figcaption></figure>

<table data-header-hidden><thead><tr><th width="232"></th><th></th></tr></thead><tbody><tr><td>Max tokens</td><td><p>Depending on the model used, requests will be limited to the specified maximum number of tokens shared between prompt and completion. <br>Maximum number of tokens will define the size of input data that can be processed and the size of the response. </p><p>For more information, read <a href="https://help.openai.com/en/articles/4936856-what-are-tokens-and-how-to-count-them">Open AI's article about tokens</a>. </p></td></tr><tr><td>Input type</td><td><p>Specify format of the data that your bot will receive from users. This can include options such as plain text or multimedia content (e.g., images, audio). </p><p>Choosing the appropriate input type ensures that your bot can properly process and respond to the information provided by users.</p></td></tr><tr><td>Pricing</td><td><p>The pricing for the AI model you select will depend on factors such as the model's complexity or the volume of usage.</p><p>Consider the pricing model and ensure that it aligns with your budget and the expected usage of your bot.</p></td></tr></tbody></table>

## 3. Memory

<figure><img src="https://912666480-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FulIQiFZkpFd5li7rHZ8c%2Fuploads%2FSl52WWdJvGPEypHRYiGR%2Fimage.png?alt=media&amp;token=e3bd0c2f-45a1-4506-af11-288df46e4f5e" alt=""><figcaption><p>Bot Configurations - Memory </p></figcaption></figure>

### Memory Setting

Enabling memory (RAG) will allow your bot to remember your interactions and learn based on them, instead of only using the AI Model and the prompted instructions. This feature might be useful for more personalized user experience.&#x20;

However, if you are creating a bot that should stay more objective and follow the prompt more strictly, you might consider disabling the memory feature.&#x20;

<table data-header-hidden><thead><tr><th width="238"></th><th></th></tr></thead><tbody><tr><td>Cutom RAG</td><td>Using a custom RAG mechanism. <br>Porvides with a choice of embeding model. </td></tr><tr><td>Open AI Assistant*</td><td>Managing memory using <a href="https://help.openai.com/en/articles/8868588-retrieval-augmented-generation-rag-and-semantic-search-for-gpts">Open AI RAG</a> mechanism and embeding model. <br>Open AI embeding model has <strong>high performance</strong> but is also <strong>more costly.</strong> </td></tr></tbody></table>

*\* Only available if you choose an AI Model from Open AI*

### Embeding Model&#x20;

**If you choose a custom RAG mechanism**, you will be presented with 2 options of embeding models. &#x20;

The choice of embedding model can significantly impact the agent's overall functionality, including its language understanding, knowledge management, dialogue coherence, generalization, and computational efficiency.

<table data-header-hidden><thead><tr><th width="238"></th><th></th></tr></thead><tbody><tr><td>Text Embedding Ada</td><td>Good performance, medium price. </td></tr><tr><td>All MPNet Base V2</td><td>Performance less consistent but the price is more affordable.</td></tr></tbody></table>

## 4. Tool&#x20;

<figure><img src="https://912666480-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FulIQiFZkpFd5li7rHZ8c%2Fuploads%2FtYB8gNnOOwgfdUs3wPes%2Fimage.png?alt=media&amp;token=7d18717c-fdcd-47e9-a104-12c41d1d51a4" alt=""><figcaption><p>Bot Cofigurations - Tool</p></figcaption></figure>

### Usage mode&#x20;

Select usage mode to control what tools that are connected to your bot node will be ative. This feature is useful during testing and development of your agent.&#x20;

<table data-header-hidden><thead><tr><th width="238"></th><th></th></tr></thead><tbody><tr><td>Auto</td><td>The bot (LLM) automatically selects the most suitable tool.</td></tr><tr><td>None</td><td>The bot (LLM) does not use any tools, even if they are available or enabled.</td></tr><tr><td>JSON</td><td>The bot (LLM) must return a JSON object instead of a summarized text message. This is useful when chaining one bot to another.</td></tr></tbody></table>

## 5. Channel&#x20;

Each bot can support 1 external channel of communication such as a Telegram or a Whatsapp Business chatbot to facilitate easier communication.&#x20;

<figure><img src="https://912666480-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FulIQiFZkpFd5li7rHZ8c%2Fuploads%2FeBTEhIEXtisOmhlk3WKE%2Fimage.png?alt=media&amp;token=9b0a26d9-ba9d-4319-a5d2-a1c2d1342ef0" alt=""><figcaption><p>Bot Configurations - Channel</p></figcaption></figure>

### Telegram&#x20;

Connecting your bot to a telegram bot is an easy way to provie more convenient and faster access to your agent. For detailed instructions, read the [Tutorial](broken://pages/OwOx1qcIVqWBWOCtnJ4w).&#x20;

<table data-header-hidden><thead><tr><th width="248"></th><th></th></tr></thead><tbody><tr><td>Telegram bot token</td><td>Provide the API token for your Telegram bot. This allows your agent to send and receive messages through the Telegram platform.</td></tr></tbody></table>

### WhatsApp&#x20;

Connecting a WhatsApp account will require a[ Meta Developer](https://developers.facebook.com/) account. To get help on the setup, contact us at <admin@kios.tech> and we will instruct you through the process.&#x20;

<table data-header-hidden><thead><tr><th width="248"></th><th></th></tr></thead><tbody><tr><td>WhatsApp business ID</td><td>Enter the unique Business ID associated with your WhatsApp Business account. This ID is used to identify your agent within the WhatsApp ecosystem.</td></tr><tr><td>WhatsApp businss phone number</td><td>Specify the phone number linked to your WhatsApp Business account. This number will be used as the sender/recipient for all WhatsApp messages.</td></tr></tbody></table>

### QR Code&#x20;

After succesfully connecting one or multiple communication channels, a QR code to access chats through Telegram or Whatsapp will be displayed in this section.&#x20;

## 6. Resources

<figure><img src="https://912666480-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FulIQiFZkpFd5li7rHZ8c%2Fuploads%2FMB4IeUBlHLUp4u1eUwJG%2Fimage.png?alt=media&amp;token=580cf511-8f09-4264-8599-78f7173d2140" alt=""><figcaption><p>Bot Configurations - Resourcse</p></figcaption></figure>

After seting up your bot, if you connect it to Tools that require connections to other online platforms such as social media, all the connected and authorized accounts (e.g Facebook, Google, Pinterest) will be listed here.&#x20;

For example, if you install a social media management tool, after you authorized your social media account, it will redirect to the engine from the Open Authorization permission page.
