> For the complete documentation index, see [llms.txt](https://docs.sprinthub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinthub.com/topicos/inteligencia-artificial/agentes-de-ia/agentes-de-i.a.-respondendo-a-mensagem-que-abriu-o-atendimento.md).

# Agentes de I.A. - Respondendo a Mensagem que Abriu o Atendimento

## Pré-requisitos

Para permitir que o agente já inicie respondendo à mensagem do lead, é necessário que algumas condições sejam cumpridas. São elas:

1. A opção "**Saudar o lead?**" deve estar ativa, fazendo com que a I.A. envie uma mensagem assim que for acionada;
2. O agente deve ter sido inicializado por meio de um Chatbot, com o gatilho "**O lead abrir um novo atendimento**";
3. O bloco "**Agente de IA**" ser o primeiro do Chatbot.

<figure><img src="/files/7kq9ajZnvc8tN2LozIq3" alt=""><figcaption><p><em>1 - Habilitando "Saudar o lead?".</em></p></figcaption></figure>

<figure><img src="/files/WlC8WpewyHDmKxIWVgKa" alt=""><figcaption><p><em>2 - Configurando o  gatilho.</em></p></figcaption></figure>

<figure><img src="/files/TOPmphX8pXGU27j7HRVu" alt=""><figcaption><p><em>2 - Configurando o gatilho.</em></p></figcaption></figure>

<figure><img src="/files/5JzDhvD4xG6e51kkOLzt" alt=""><figcaption><p><em>3 - Adicionando o bloco no Construtor.</em></p></figcaption></figure>

## Testando o Agente

Esse gatilho acionará o Chatbot e, consequentemente, o agente de I.A., assim que o lead entrar em contato pelo canal e conta definidos no gatilho, desde que não possua um atendimento ativo.

Uma consideração importante sobre a inicialização do agente é que, com a opção **"Utilizar mensagens anteriores"** ativada, ele também considerará mensagens enviadas em atendimentos passados, o que proporciona maior precisão nas respostas.

<figure><img src="/files/5TudUPim7UVjFUmQ33AS" alt=""><figcaption><p><em>Testando agente.</em></p></figcaption></figure>


---

# 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 dynamically by asking a question.

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

```
GET https://docs.sprinthub.com/topicos/inteligencia-artificial/agentes-de-ia/agentes-de-i.a.-respondendo-a-mensagem-que-abriu-o-atendimento.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
