> 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/bots/website-mobile-app-bot/website-manage-chatflow/components-in-chatflow/ai-agent-component.md).

# AI Agent Component

This section contains essential information and usage guidelines for managing the AI Agent component inside BotPenguin ChatFlows.

### **What is AI Agent Component?**

The AI Agent Component is an advanced chatbot block within ChatFlows that enables AI-driven conversations.

It replaces the older AI component and provides enhanced capabilities such as contextual responses, controlled execution, and configurable AI behavior through centralized AI settings.

***

### **Benefits of AI Agent Component**

* 🚀 Enables intelligent, context-aware conversations
* ⏱️ Reduces dependency on static flows and manual logic
* 🎯 Improves response accuracy using AI-driven reasoning
* 🔄 Provides flexible control over AI execution and transitions
* 📈 Enhances user experience with dynamic interactions

***

### **Expected Outcome**

After setting this up:

* Your chatbot will respond intelligently using AI
* You will be able to control how and when AI responds
* Users will experience more natural and adaptive conversations

{% hint style="info" %}
**Tip**: Combine AI Agent with flow logic to balance automation and control.
{% endhint %}

***

### **How to Use AI Agent Component**

1. Go to the **“ChatFlows”** section from the left sidebar.
2. Open or create a flow and add the **“AI Agent”** component.

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2FubBpFAPPhxXkzJ64ToHI%2Fimage%20(23).png?alt=media&amp;token=ea276956-011f-4974-8360-ec152ff0fddc" alt=""><figcaption></figcaption></figure>

2. Enter the **“Message”** that will be displayed to the user.

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2FBpmgPJvNWxz5ddDH9vZY%2Fimage%20(7).png?alt=media&amp;token=93d3b675-f767-4b7f-ab99-03a014569cf2" alt=""><figcaption></figcaption></figure>

4. Configure the **“Exit Prompt”** to define when the AI should stop execution.

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2Fii5UZJhA5rLICOcN16a2%2Fimage%20(8).png?alt=media&amp;token=af6ae4f7-70bc-4a75-9e25-246cef2b55f8" alt=""><figcaption></figcaption></figure>

5. Enable and configure **Guarded Queries** to limit the number of user interactions (optional).

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2FnLwFpxQXGKLgS7LCMQS8%2Fimage%20(9).png?alt=media&amp;token=0f50a45c-46cf-4ace-8231-3f8c1e6e3868" alt=""><figcaption></figcaption></figure>

6. Select the **“Go To Next”** step to define the next flow after AI execution.

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2FFjTRPf6VzcCj6RP15qN6%2Fimage%20(10).png?alt=media&amp;token=0982427b-f208-4d2f-aa79-afd7c835acb9" alt=""><figcaption></figcaption></figure>

7. Expand **“Advanced Settings”** and configure:
   1. Notify when user responds
   2. Read messages after each interaction
   3. Include answers in email transcripts

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2FZeyVp1jH8oWKj42tCu96%2Fimage%20(11).png?alt=media&amp;token=1cff166f-7777-4118-b59d-0cbcf84ece60" alt=""><figcaption></figcaption></figure>

***

### **Configuring AI Settings**

To control how your AI Agent behaves globally:

1. Go to the **“Bot Settings”** section.
2. Navigate to **“AI Settings”**.

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2FQjPdd4KyDhsoeeWLa6LL%2Fimage%20(12).png?alt=media&amp;token=973004d0-a81f-4d9e-a483-4b05688d0d87" alt=""><figcaption></figcaption></figure>

3. Configure the following:
   1. Prompt:&#x20;
      1. Define the Core Instructions that set your AI Agent's purpose and capabilities, plus Conversation Flow Instructions that guide it step by step through the conversation.&#x20;
      2. Use "/" to reference tools or custom attributes inline.
   2. Communication Style:
      1. Control how your AI Agent responds — answer length, tone, language, formatting, and point of view — or let the agent decide each dynamically.
   3. Metadata:
      1. View and manage the attributes your AI Agent automatically extracts from conversations, like names, dates, and preferences, and toggle which ones it captures.
   4. Advanced AI Settings (LLM provider, fallback models, etc.):
      1. Configure the LLM provider and fallback model, set token limits and temperature, and control tool-calling behavior for your AI Agent.

***

### Best Practices

> 💡 Use clear prompts to guide AI behavior effectively

> ⚠️ Define exit conditions properly to avoid infinite AI loops

> 🚀 Limit guarded queries to maintain control over conversations

> 🎯 Align AI responses with your business tone and use case

***

### Troubleshooting

<details>

<summary>AI Agent not responding correctly</summary>

Check your prompt and communication style settings. Improper configuration may lead to irrelevant responses.

</details>

<details>

<summary>AI continues responding without stopping</summary>

Ensure that the Exit Prompt is properly defined to control when the AI should stop.

</details>

<details>

<summary>Guarded queries not limiting interactions</summary>

Verify that the guarded query limit is correctly set and saved.

</details>

<details>

<summary>AI responses not aligned with business tone</summary>

Update the communication style and prompt settings in AI Settings.

</details>

<details>

<summary>Advanced settings not applying</summary>

Ensure that the selected LLM provider and fallback configurations are correctly saved.

</details>

***

### FAQs

<details>

<summary>What replaced the old AI component?</summary>

The AI Agent Component has replaced the older AI block with enhanced capabilities and centralized configuration.

</details>

<details>

<summary>What is an Exit Prompt?</summary>

It defines the conditions under which the AI stops responding and moves to the next step.

</details>

<details>

<summary>What are Guarded Queries?</summary>

They limit the number of interactions a user can have with the AI component.

</details>

<details>

<summary>Can I customize AI behavior globally?</summary>

Yes, you can configure prompts, styles, and advanced settings in the AI Settings section.

</details>

<details>

<summary>Can I control what happens after AI execution?</summary>

Yes, using the “Go To Next” option, you can define the next step in the flow.

</details>

<details>

<summary>Which AI model does the agent use?</summary>

You can configure the LLM provider and fallback models in Advanced AI Settings.

</details>

<details>

<summary>Can I use AI Agent with other flow components?</summary>

Yes, it can be combined with other components to create hybrid flows.

</details>

***

### Related Articles

{% content-ref url="/pages/j9SvVlVhtrdYy3hVRVZB" %}
[Prompt Style](/ai-agents/creating-ai-agents-in-botpenguin/setting-up-your-ai-agent/prompt-style.md)
{% endcontent-ref %}

{% content-ref url="/pages/t6ZFUSSq7YIhzWrB8v5C" %}
[Communication Style](/ai-agents/creating-ai-agents-in-botpenguin/setting-up-your-ai-agent/communication-style.md)
{% endcontent-ref %}

{% content-ref url="/pages/jakZB6qXvKUZ2Hf1vZ2j" %}
[Meta Data](/ai-agents/creating-ai-agents-in-botpenguin/setting-up-your-ai-agent/meta-data.md)
{% endcontent-ref %}

{% content-ref url="/pages/llGSeIT33nmHxeNc9lyR" %}
[Advance AI Settings](/ai-agents/creating-ai-agents-in-botpenguin/advance-ai-settings.md)
{% endcontent-ref %}

***

### Support

If you still have questions for our team, write to us at [**support@botpenguin.com**](mailto:support@botpenguin.com). We’ll get back to you within 48 hours.

***

### 🎉 Completion

🎉 Congratulations, you have successfully completed this section! You're one step closer to mastering BotPenguin AI capabilities.
