Skip to content
Docs

Chat Threads

A Chat Thread is an agent’s conversation memory. It holds an ordered list of messages (each with a role, content, and token usage) that the agent loads at the start of each turn and appends to at the end.

Memory is wired as a node, not as a field on the Agent. Add a Chat Thread node to the canvas (under AI in the node picker), connect its output to the agent’s MEMORY handle (the stacked discs on the Agent node’s bottom edge, second from the left), and configure it:

Field Required Description
conversationId Yes A stable key that identifies this conversation. Use a per-user, per-chat value — e.g. {{ $start->threadId }} from a chat trigger.
channel No The channel type (discord, slack, teams, telegram, whatsapp). Omit for non-channel agents.
userId No Scope the thread to a specific user within the conversation. Useful when multiple users share a channel conversation.

All three fields accept expressions.

The thread is identified by the combination of channel, conversationId, and userId. The first time a run matches this combination, the thread is created; subsequent runs with the same values append to it. There is no thread ID to manage — use stable, meaningful values and the right history is always loaded.

Go to Conversations and open a thread. The list shows each thread’s title, the agent it is with, a preview of the last message, and message count. Two views split it: Builder holds your own conversations with the AI builder, and Agent channels holds the ones your agents have with people, wherever they talk. To read one agent’s conversations, pick it under Agent in the filters. A builder conversation has no agent.

A thread opens to be read: it shows its channel, its agent, when it started and its last activity, then the Conversation transcript:

  • a role badge per message (User, Assistant, …),
  • the message content (expandable; tool-heavy assistant turns may have little text),
  • token usage per message (tokens in / out),
  • a tool calls viewer for assistant turns that invoked tools. With Carry forward set to What was said and done it shows each call with what it returned. With What was said, the default, it shows each call’s name and arguments, and the result reads On the run: open the run to see it,
  • a Run link per message, to the run it was said in. Runs are deleted sooner than conversations, so a message whose run is gone says The run is no longer kept instead. Messages written before runs were linked have none,
  • and a header rollup: total messages and total tokens in / out.

It works the other way too: on a run’s page, an agent with a Chat Thread links to its conversation.

The Conversations list with each thread's title, agent, last message, channel, message count and last activity
The Conversations list with each thread's title, agent, last message, channel, message count and last activity
One conversation's transcript: user and assistant messages with tokens in and out, Tool calls on the assistant turns, and the totals above and below
One conversation's transcript: user and assistant messages with tokens in and out, Tool calls on the assistant turns, and the totals above and below
The Tool calls dialog of an assistant turn, showing the raw call to subagent__route_shipments_by_weight with its arguments and result
The Tool calls dialog of an assistant turn, showing the raw call to subagent__route_shipments_by_weight with its arguments and result

This is the place to confirm an agent recalled context, called the right tools, and answered correctly — pair it with the flow page’s Run by hand action when building an agent.

A thread is runtime conversation data, scoped to the tenant. It is not part of a flow’s definition. Deleting a flow does not delete its threads, and any flow can read from a thread that shares the same channel + conversationId + userId identity.