> For the complete documentation index, see [llms.txt](https://help.botpenguin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.botpenguin.com/ai-agents/advanced-ai.md). Agents can also search and read this documentation through its [MCP server](https://help.botpenguin.com/~gitbook/mcp).

# Advanced AI

Advanced AI is where you choose the AI model behind your agent and fine-tune how it works. You can connect your own AI account, set limits on answers, turn on voice, summarise chats and let the agent remember details. The page has six sections that open one at a time.

### Prerequisites

* An AI agent. See Create your first AI Agent.
* Edit access to AI Agents to change settings. Connecting a new account also needs edit access to Third party apps. People with view access can see the settings but cannot change them.
* An account with the AI provider you want to use, if you bring your own key.

### Key definitions

| Term                   | Meaning                                                           |
| ---------------------- | ----------------------------------------------------------------- |
| LLM provider           | The company whose AI model answers customers, for example OpenAI. |
| Model                  | The specific AI model the agent uses.                             |
| Token                  | A small piece of text. Models count and limit text in tokens.     |
| Voice provider         | The service that turns the agent's replies into speech.           |
| Transcription provider | The service that turns the customer's speech into text.           |
| Memory                 | Details the agent keeps from earlier chats.                       |

### How the page works

* The first section is open. Only one section is open at a time, and the page does not remember which one you opened.
* Each section has its own Update button, so open another section only after you save.
* Accounts you add here are saved in Third party apps under More. You edit, rename or delete them there.
* If you delete an account that agents use, a warning shows on your Home page.

### Steps

1. Open **Advanced AI** under Settings in the AI Agent sidebar. LLM provider is open.

![Open Advanced AI](https://content.gitbook.com/content/APDb8cKQtGlIAfgHjcsQ/blobs/F1L281fk2QdG7LqQdR1B/images/advanced-ai-step-1.png)

2. In **LLM provider**, choose the provider, the Connected account and the Model.
   * If you have no account for the provider, add one with Add new account. Enter the details and click Connect account.
   * If you already have one, pick it from Connected account.
   * When you change the provider, the model changes to that provider's default. You can change it.
   * Click Purchase AI message add-on to buy more AI messages. It does not show if your partner has turned it off, or if you cannot open Subscriptions.

![Choose the provider, account and model](https://content.gitbook.com/content/APDb8cKQtGlIAfgHjcsQ/blobs/JflWRrE2wRslZNFMVflF/images/advanced-ai-step-2.png)

3. Open **Advanced AI**. Turn on what you need.
   * **Process images:** the agent reads images customers send. Off by default.
   * **Process audio recordings:** the agent listens to voice notes. They show in the Inbox. Off by default.
   * **Switch model after exceeding token count:** moves to another model when one question reaches the token limit. Off by default.
   * **Enable agent response streaming:** shows replies word by word. On by default.

![Turn the Advanced AI options on or off](https://content.gitbook.com/content/APDb8cKQtGlIAfgHjcsQ/blobs/mruANLbOpvPOS70V5GQg/images/advanced-ai-step-3.png)

4. Scroll down in the same section and set the answer controls:
   * **Model after switching:** the model to use after a switch. It is greyed out until the switch option is on. Your choice is kept if you turn the switch off.
   * **Search mode:** Fast for everyday questions, or Deep for more effort and full data processing. The default is Fast.
   * **Max token count:** the most tokens for a single question. The default is 1024.
   * **Reasoning effort:** Low, Medium or High. The default is Medium.
   * Click **Update** to save.

![Set the search mode, token count and reasoning effort](https://content.gitbook.com/content/APDb8cKQtGlIAfgHjcsQ/blobs/RjgxQEkTQWdW1xjly6Nx/images/advanced-ai-step-4.png)

5. Open **Chat summary**. Turn on **Enable AI chat summary** to summarise each conversation. It is off by default. Turning it off keeps old summaries. Click Update.

![Turn on AI chat summary](https://content.gitbook.com/content/APDb8cKQtGlIAfgHjcsQ/blobs/r4wHkaa2wfxCckMd2WNC/images/advanced-ai-step-5.png)

6. Open **Voice provider** if your agent speaks. Choose the provider, the Connected account, the Model and the Voice. If you have no account, click Add new account. Click Purchase voice add-on if your plan has no voice. Click Update.

![Choose a voice provider, model and voice](https://content.gitbook.com/content/APDb8cKQtGlIAfgHjcsQ/blobs/AJ5ksLoWYg1z5X39ei5y/images/advanced-ai-step-6.png)

7. Open **Transcription provider** if your agent listens to speech. Choose the provider and an account. If you have no account, click **Add new account**. Click Purchase voice add-on if your plan has no transcription. Click Update.

![Choose a transcription provider](https://content.gitbook.com/content/APDb8cKQtGlIAfgHjcsQ/blobs/5HVT0AAQraCVuvAKkgYR/images/advanced-ai-step-7.png)

8. Open **Advanced memory retention**. Turn on **Enable advanced memory retention** so the agent keeps details from chats. Write a memory prompt that says what to keep. It has a default text and a limit of 1,000 characters. If you use Mem0, connect a Mem0 account in Third party apps. Click Update.

![Turn on advanced memory retention](https://content.gitbook.com/content/APDb8cKQtGlIAfgHjcsQ/blobs/a0O2hKVUQsGdw0uU2jV6/images/advanced-ai-step-8.png)

Use Reset in a section to go back to its standard values. Test every change in the Agent Preview before you go live.

### Common errors

<details>

<summary>It says my API key is invalid</summary>

Check that the key is correct and has not expired. Check that it has no extra spaces. Create a new key in your provider account if needed. Edit the account in Third party apps.

</details>

<details>

<summary>The agent does not speak</summary>

Open Voice provider and check that a provider, an account, a model and a voice are chosen. Check that your plan includes voice, or buy the add-on. Click Update and test in the Agent Preview.

</details>

<details>

<summary>The agent does not understand voice messages</summary>

Open Transcription provider and check the provider and account. Turn on Process audio recordings in Advanced AI.

</details>

<details>

<summary>The agent forgets details</summary>

Open Advanced memory retention. Check that it is on and that the memory prompt says what to keep. If you use Mem0, check the account in Third party apps.

</details>

<details>

<summary>Model after switching is greyed out</summary>

Turn on Switch model after exceeding token count first.

</details>

<details>

<summary>Answers are cut short</summary>

Raise the Max token count, or check whether the agent switched to another model after reaching the limit.

</details>

<details>

<summary>I lost my changes when I opened another section</summary>

Each section has its own Update button. Click Update before you open another section.

</details>

### Support

Still not working? Write to us at <support@botpenguin.com>. We will reach out to you within 24 hours.
