# Chatbot - Using AI Agents

The **AI Agent** enables the chatbot to automatically respond to users using artificial intelligence, interpreting questions and generating answers based on a configured context. This makes support more natural, flexible and capable of handling open-ended questions.

Unlike rigid flows with buttons or fixed paths, the AI Agent understands the user's message intent and responds dynamically.

{% embed url="<https://youtu.be/8r8Iwjmkav8>" %}

***

### How the AI Agent works

When the **AI Agent** is active in the chatbot:

1. The user sends a message.
2. The AI analyzes the content of the question.
3. The system queries the **configured context** (information, rules or knowledge base).
4. The AI generates an appropriate response and sends it to the user.

This allows answering questions such as:

* Service hours
* Information about products or services
* Frequently asked questions
* General guidance

All without the need to create a specific flow for each question.

To create your AI Agent, see the article below:

{% content-ref url="/pages/861bb44c720660c049e303ea9addac19dfc003cc" %}
[AI Agents - Initial Settings](/en/topics/artificial-intelligence/ai-agents/ai-agents-initial-settings.md)
{% endcontent-ref %}

{% content-ref url="/pages/51adcffad614e83955c54e913438e004abf88441" %}
[Configuring the MCP AI Agent - Creating an Agent to Rewarm Leads](/en/topics/artificial-intelligence/ai-agents-mcp/configuring-the-mcp-ai-agent-creating-an-agent-to-rewarm-leads.md)
{% endcontent-ref %}

***

### Where the AI Agent can be used

The AI Agent can be used at different points in the chatbot, for example:

* **Initial support** to answer general questions
* **Automatic support** before routing to an agent
* **Flow supplement**, when the user asks questions outside the bot's script
* **Knowledge base**, answering questions about products, services or processes

***

### Best practices when using AI in the chatbot

To obtain better answers, it is important to properly configure the AI context.

It is recommended:

* Insert **clear information about the company**
* Define **service rules**
* Include **frequent questions and answers**
* Provide **products, services and hours**

The more complete the context, the more accurate the AI's responses will be.

***

### Integration with human support

Even when using AI, the chatbot can transfer the user to an agent when necessary.

Some examples:

* When the AI does not know how to answer
* When the user requests to speak with an agent
* When human support is required

Thus, the AI Agent helps to **automate a large part of conversations**, but retains the possibility of human support when needed.

***

✅ **Tip:** The AI Agent can be combined with traditional chatbot flows, using menus, buttons and automations to create a more complete support experience.

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sprinthub.com/en/topics/convert/chatbot/chatbot-common-questions/chatbot-using-ai-agents.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
