Skip to content

Chat & Conversations

Flow-Like chat boards begin with a Chat Event and return responses through chat callback nodes. The event supplies the current conversation and session context; the workflow decides which model, tools, retrieval, and response behavior to apply.

Chat Event starts the board and exposes:

OutputPurpose
HistoryCurrent model-compatible chat history
Local SessionState scoped to this chat
Global SessionState scoped to the user
ToolsTools requested through the chat surface
ActionsUser actions from prior interactive content
AttachmentsUploaded files or references
UserCurrent user information

Read only the outputs the workflow needs. Treat user text, attachments, and restored session values as untrusted input.

A basic model-backed chat board:

  1. receives History from Chat Event;
  2. applies the system instruction;
  3. invokes a configured model;
  4. pushes the resulting response to the chat.
StageNode
Set role and rulesSet System Message
Invoke configured modelInvoke Model
Return complete responsePush Response

The system message should state the role, source policy, tool policy, refusal behavior, and expected response shape. Do not include credentials or private operational data.

The event’s History output already contains the conversation supplied by the chat surface. History nodes let the workflow modify a copy before invocation:

NeedNode
Create an empty historyMake History
Add a messagePush Message
Build from messagesFrom Messages
Limit retained messagesSet History N
Remove the latest messagePop Message from History
Clear historyClear History

Keep enough history for the task, but avoid unbounded transcripts. Store durable application facts in typed app or workflow state rather than relying on old conversational text.

History configuration nodes expose settings such as:

Provider support varies. A setting present in the workflow does not guarantee that every provider or model implements it identically.

Enable streaming on the history or invocation path supported by the configured model, then pass each model response chunk to Push Chunk.

Use Push Response when:

  • the model returns one complete response;
  • the workflow must validate or redact the full result before display;
  • the response is short enough that progressive delivery adds little value.

Use Push Chunk when:

  • the model provides response chunks;
  • the user benefits from lower perceived latency;
  • the workflow can still report a final completion or failure state.

Do not stream raw internal reasoning. Stream user-facing answer content and named progress states.

The chat callback nodes include:

NeedNode
Add a named progress stepPush Step
Update text for a stepPush Text to Step
Remove a stepRemove Step
Push one statisticPush Stat
Push several statisticsPush Stats

Progress should describe observable work such as “Searching documents” or “Validating order,” not hidden chain-of-thought.

Push Local Session updates state local to the conversation. Push Global Session updates user-level state.

Use local session state for turn-specific workflow context and global session state only for durable user preferences or facts that legitimately cross conversations. Define retention, schema, and deletion behavior for both.

Never trust a restored session field as authorization. Re-check permission at the operation boundary.

Extract Attachments retrieves attachments from model history. Response attachments can be created:

Before processing an upload:

  • validate file type and size;
  • inspect or scan content according to the app’s threat model;
  • keep the original source reference;
  • send only the necessary content to a model;
  • avoid exposing filesystem paths in the response.

Use a structured interaction when required input should not be guessed from free text:

InteractionNode
FormChat Form
One optionSingle Choice
Several optionsMultiple Choice

Structured interactions are useful for configuration, approvals, and collecting missing fields before a tool call.

  • Use RAG and knowledge bases when answers must be grounded in a controlled document corpus.
  • Use AI agents when the assistant must choose among bounded tools.
  • Keep ordinary deterministic checks in the board even when a model or agent is involved.

Every chat path should finish in one of three visible states:

  • complete response;
  • request for missing information;
  • explicit failure or inability to answer.

If a tool or side effect fails, do not let an earlier streamed sentence imply success. Redact secrets and sensitive payloads from errors, and preserve a safe run identifier for support.

  • Chat Event outputs are treated as untrusted input
  • System instructions and model configuration are versioned
  • History is bounded
  • Session state has scope and retention rules
  • Streaming has explicit completion and failure
  • Attachments are validated before processing
  • Structured interactions collect required fields
  • Retrieval and tools enforce access outside the prompt
  • Logs and errors redact sensitive data