---
title: Chat Trigger
description: Run the flow on each chat message from the user.
---

Turn a workflow into a chatbot: every message you send runs the workflow once.

## What it does

The Chat Trigger opens a chat window. Each message you send starts one run of the workflow, from this trigger only, with your text in `chatInput`.

### Who replies

In AWFlow 0.9 the run has a **reply channel** back to the chat. The reply comes from the **reply step**: a [Respond to Chat](/nodes/builtin/flow/respond-to-chat/) step, or else the last AI step on the trigger's path. It **streams** into the chat as it is written, and tool calls show as short chips. **Stop** stops the run; the part of the reply already written is kept and marked as stopped.

* **New Chat Triggers (version 2)** don't need a Chat Memory. Without one, the chat keeps the session's messages until it is closed. Connect a [Chat Memory](/nodes/builtin/ai/aidependencies/chatmemories/chatmemory/) to keep the conversation for later (and to see it on the [Memory page](/app/memory/overview/)).
* **Chat Triggers saved before 0.9** keep needing a Chat Memory, shared with the agent that answers: the agent saves both messages there and the chat window reads them back. **Update** in the step's header moves to version 2.

### Show in Aria

Turn on **Show in Aria** (with a one-line **Description**) and, once the workflow is **On**, it appears in Aria's list next to your agents, with a workflow badge, and in **@mentions**. A workflow chat in Aria is a chat with its own thread: each message runs the saved workflow from this trigger, with the active tab's address and title. Each reply shows *Ran N steps · time · View run*. If the workflow is Off, the chat offers **Turn it on**. Typing `@support-bot …` in any Aria chat runs that workflow for one message and posts its reply. See [Chat with Aria](/app/chat-and-agents/chat/).

### Attachments

Under **Attachments** (off by default), let people send **files** (choose the **File types** and the **Largest file (MB)**) and **the page you are on** (the tab, with or without the selected text). Files reach the run under `$binary` (`file0`, `file1`…) with a `files` summary; the page arrives as `page` (`url`, `title`, `text`, `selection`), marked as untrusted content for AI steps. Attachments work in the canvas chat and in Aria workflow chats.

**Where you can chat:**

* **On the canvas.** **Run** opens the chat when the Chat Trigger is the only trigger. You can also pick it in the trigger picker or press the node's **Run step** button.
* **On web pages (extension).** When the workflow is **On**, a chat bubble appears on pages matching **URL Patterns**. If several chat workflows match, the bubble lets you pick one. You can also right-click and choose **Open chat**. The run still happens in the AWFlow app tab, and the page's `url`, `title` and `tabId` are passed to the trigger.

## When to use it

* Build an assistant you can talk to while designing a workflow.
* Put a helper on specific websites, for example your internal tools, using **URL Patterns**.
* Give an agent a running conversation, so each message builds on the earlier ones.

For a one-off question without a chat window, start the agent from [When I press Run](/nodes/builtin/trigger/whenstarted/) or [From the right-click menu](/nodes/builtin/trigger/contextmenu/) instead.

## Inputs and settings

**Assistant name**, **Icon**, **Greeting**, **Input placeholder** and **Starter prompts** only change how the chat window looks. **URL Patterns** decides on which pages the chat bubble shows (`<all_urls>` means every page); it uses the form `https://*.example.com/*`.

## Outputs

Each output item has these fields:

```json title="Shape of an output item"
{
  "triggerType": "chat",
  "triggeredAt": "…",
  "chatInput": "…",
  "sessionId": "…",
  "url": "…",
  "title": "…",
  "tabId": 0,
  "$binary": {},
  "files": [],
  "page": {}
}
```

Set the agent's prompt to `{{ $input.chatInput }}`. `sessionId` is empty when the memory uses **This run only** storage. `url`, `title` and `tabId` are only set when you chat from a web page.

## Dependencies and credentials

Connect a [Chat Memory](/nodes/builtin/ai/aidependencies/chatmemories/chatmemory/) to the **Memory** slot, and connect the **same** Chat Memory node to the memory slot of the agent that answers ([Tools Agent](/nodes/builtin/ai/aiagents/toolsagentnode/) or [RAG Agent](/nodes/builtin/ai/aiagents/ragnode/)). Use **Conversation** storage (pick a conversation, or leave it empty to give the node its own) or **Key** storage with a fixed key.

> **CAUTION:**
>
> The chat window needs to know the conversation before a run. That works with **Conversation** storage and with a fixed key. With **This run only**, or a key written as an expression such as `{{ $input.userId }}`, the chat keeps no history and each message is answered on its own.

Workflows built with the older Local Memory, Persistent Chat Memory or Window Buffer Memory keep working; those nodes are now [upgraded to Chat Memory](/nodes/builtin/ai/aidependencies/chatmemories/chatmemory/).

## Example workflow

1. Add a **Chat Trigger**.
2. Add a [Chat Memory](/nodes/builtin/ai/aidependencies/chatmemories/chatmemory/) with **Conversation** storage and connect it to the trigger's **Memory** slot.
3. Add a [Tools Agent](/nodes/builtin/ai/aiagents/toolsagentnode/) after the trigger, connect a chat model, and connect the **same** Chat Memory to its memory slot.
4. Set the agent's prompt to `{{ $input.chatInput }}`.
5. Press **Run** and start chatting.

## Common issues

* **"Dependency memory is required", or the chat says no Chat Memory is connected.** Connect a Chat Memory to the trigger's **Memory** slot.
* **Nothing appears, not even my own message.** The trigger does not save messages; the agent does. Check that an agent runs on every message and uses the same memory node as the trigger.
* **The agent answers but the chat stays empty.** The agent uses a different memory, conversation or key than the trigger.
* **The chat forgets earlier messages.** The memory uses **This run only** or a key written as an expression. Use **Conversation** storage or a fixed key.
* **Each message shows twice, or several replies appear.** Every agent connected to the same memory saves its own copy. Use one agent per conversation.
* **On a web page, the "thinking" indicator never stops.** The run failed before a reply was saved. Press stop, then check the run in the execution history. Stop only resets the chat window; a run that is still going keeps going.
* **No chat bubble on a page.** Turn the workflow On and check that a **URL Patterns** entry matches the page.

## Related nodes

* [Chat Memory](/nodes/builtin/ai/aidependencies/chatmemories/chatmemory/): stores the conversation the chat shows.
* [Tools Agent](/nodes/builtin/ai/aiagents/toolsagentnode/): answers each message, with tools.
* [RAG Agent](/nodes/builtin/ai/aiagents/ragnode/): answers from your own documents.

See also [Memory & Context](/concepts/ai/memory-context/).