> For the complete documentation index, see [llms.txt](https://documentation.proto.cx/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.proto.cx/docs/modules/ai-agents/workflows-and-actions/message-received.md).

# Message received

Respond when a person's message matches a defined intent.

`Trigger` — The most common trigger. Fires when a person's message approximately matches a defined intent.

## Fires when

A person sends a message that approximately matches any of the defined training phrases and does not match an excluded phrase.

## When to use it

To respond to a particular topic or request — recognising that a person wants to make a complaint, check a status, or speak to a live agent.

## Settings

| Setting                | Description                                                                                                                                              |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Training phrases**   | Example phrases a person might send. A message approximately matching any of them fires the trigger. Add several variations to improve recognition.      |
| **Intent description** | A natural language description of the intent. Works independently from training phrases and can be used alongside them. Optional.                        |
| **Excluded phrases**   | Phrases that must not match. If a person's message matches an excluded phrase, the trigger does not fire even if it matches a training phrase. Optional. |

Press **Save** to confirm edits.

## AI-assisted matching

If a person's message does not clearly match any trigger's training phrases or intent description, and the AI agent's **Large language model** setting is enabled (see [Manage AI agents](/docs/modules/ai-agents/manage-ai-agents.md#agent-tabs)), the platform asks an LLM to decide what happens next, using the recent conversation as context. The LLM either:

* Fires one of the candidate Message received triggers available at the current workflow level, running its configured actions — including any quick replies, or
* Answers directly with a free-text reply, drawing on the agent's [Knowledge](/docs/modules/ai-agents/knowledge.md) sources. A free-text reply has no quick-reply buttons, since it isn't produced by a Send message action.

Only messages that carry meaningful text of their own — for example bot and agent text messages, voice transcriptions, and media captions — are included in the conversation passed to the LLM. Messages with no text of their own, such as a quick-reply button list or plain media without a caption, are left out. This keeps the LLM's view of the conversation accurate, so that if the same trigger is still the right match later in the conversation, the LLM reliably re-selects it and its quick replies render as configured, instead of occasionally substituting a free-text reply with no buttons.

This same LLM-assisted step can also run when a conversation falls through to [Fallback](/docs/modules/ai-agents/workflows-and-actions/fallback.md) at the top level of a workflow.

## Localisation

Training phrases, intent description, and excluded phrases are localised per language. Enter content for each configured language or the trigger will not fire in that language. See [Workflows and actions — Localisation](/docs/modules/ai-agents/workflows-and-actions.md#localisation).

## Example

```
Message received
• Training phrases:    "I want to complain", "make a complaint", "file a complaint"
• Intent description:  "The person wants to submit a complaint."
└─ Send message: "I can help with that. What is your complaint about?"
```

## Related

{% content-ref url="/pages/A2jryJTjL9Iwnm5XZE47" %}
[Attachment received](/docs/modules/ai-agents/workflows-and-actions/attachment-received.md)
{% endcontent-ref %}

{% content-ref url="/pages/7JuKRTRYhN0MQTWsc6AN" %}
[Fallback](/docs/modules/ai-agents/workflows-and-actions/fallback.md)
{% endcontent-ref %}

{% content-ref url="/pages/CPDl7PGr2ABWirxChzBX" %}
[Manage AI agents](/docs/modules/ai-agents/manage-ai-agents.md)
{% endcontent-ref %}
