Skip to content
Docs

Chat Thread

Chat Thread gives an Agent memory of the conversation it is in. Before each model call it loads the most recent messages of the matching conversation, and after the reply it records the new user and assistant turns. You find it on the node picker’s AI shelf.

Connect the node’s Memory output handle to the agent’s Memory handle. The node keeps the verbatim transcript of one conversation; for knowledge that survives across conversations, use Governed Memory instead.

The Chat Thread node's settings form, with the fields described below
The Chat Thread node's settings form, with the fields described below
FieldTypeDefaultDescription
Channel (channel)string ✦ (required) — The channel this conversation belongs to, e.g. slack or telegram, used together with the conversation id to identify the thread.
Conversation (conversationId)string ✦ (required) — The external conversation identifier that keys this chat thread, so messages from the same conversation share memory.
User (userId)string ✦ (optional) — External user identifier, used to scope the thread to a specific participant.
Title (title)string ✦ (optional) — A human-readable name for this conversation, shown wherever threads are listed. Leave empty and the list falls back to the channel and conversation id.
Write policy (writePolicy)one of every_turn, queued, event_triggered, manual (optional) every_turn When the turn is saved to the thread: EveryTurn writes synchronously each turn, Queued defers the write to a background job.
Recency window (recencyWindow)integer (optional) 20 How many of the most recent messages from this thread to load back into the prompt window.
Carry forward (memoryMode)one of messages, transcript (optional) messages What each earlier turn brings into the next: only what was said, or also the tools the agent called and what they returned.
Let the agent search past conversations when it needs to (allowSearch)boolean (optional) false Let the agent search the recorded conversations of the person it is serving, including messages compaction has archived. Recent history is loaded either way.

Fields marked ✦ accept expressions.

The thread’s identity is the combination of channel, conversationId, and optionally userId. Use the same values on every turn and the agent keeps recalling the same conversation; leave conversationId empty and there is no cross-run thread to recall. The title is written once, when the thread is first created, and names the conversation wherever threads are listed.

Chat Thread runs no step of its own and emits no output. It works inside the agent’s turn:

  • Before the call it loads the most recent messages of the thread (the recencyWindow, 20 by default) as prior dialogue, plus any active notes recorded on the thread as standing context.
  • After the reply it appends the user message and the assistant answer, recording token usage on the answer, according to the writePolicy.

writePolicy decides when that write happens: every_turn records as the turn runs, queued hands the write to a background job, and manual recalls without ever recording. event_triggered records nothing today, so choose manual when you mean never record.

You can read every recorded transcript, message by message, under Conversations. See Chat Threads.

With allowSearch enabled, the node also offers the agent a search_conversations tool that searches recorded conversations word-for-word, including messages that compaction has archived. The search matches a term case-insensitively against what was said, so it finds a distinctive word rather than a paraphrase, and it only ever reads.

The agent searches only the conversations of the person it is serving: every conversation with the same userId on the same channel. When the node has no userId, it searches this conversation alone, and when it has neither a userId nor a conversationId it searches nothing.

The LLM / Agent — Memory thread template is the minimal wiring: a Chat Thread node connected to the agent’s Memory handle, with the conversation keyed by the run’s input:

{{ $start->threadId }}

The Telegram support agent template keys the thread by the inbound chat instead, so every Telegram conversation gets its own memory. It sets channel to the literal telegram, and fills the identity from the webhook payload, with conversationId:

{{ $start->payload->message->chat->id }}

and userId:

{{ $start->payload->message->from->id }}
  • Recall is the most recent recencyWindow messages. In a long conversation older turns fall out of the window until compaction condenses them into a summary; see Memory for how the layers fit together.
  • The thread only persists across runs when your flow supplies the same conversationId every turn. An identity built from a value that changes per run gives the agent a fresh, empty thread each time.
  • Governed Memory remembers durable items across conversations instead of one transcript.
  • Conversation Notes lets the agent pin working notes on the same thread.
  • Memory explains how the memory layers fit together.
  • Chat Threads is where you inspect recorded conversations.