Skip to content

AI Assistant Block – a chat with an AI assistant in the form

The AI assistant block puts the chat of an AI assistant into the form. All expressions of the block are evaluated against the record of the form, so the conversation can be about that record – the record and its files can be attached from the start.

This page is part of the form block reference.


1. At a glance

Purpose Chat with an AI assistant next to the record
Typical use "Summarise this ticket", "Draft a reply", questions about a contract attached to the record
Related AI assistants, Files Block

The assistant answers within the rights of the user who is looking at the form. It never shows records that user may not see.


2. Settings

Setting Meaning Default / required
"AI Assistant" The assistant that answers. Its purpose and tool groups decide what it can do. Required
"Chat Identification" Identifies the conversation, so a user returning to the form continues where they left off. Different values give separate conversations; the user is always part of it, so users never share a conversation. one conversation per user and assistant, the same on every record
"First Chat Message" Message sent on behalf of the user when a new conversation starts (and when the user starts over), for example Summarise this ticket none
"Hide First Chat Message" Sends the first message without showing it; only the answer appears off
"Enable Attach Record" Condition under which the user may attach records allowed
"Enable Attach File" Condition under which the user may upload files. The assistant has to accept files as well. allowed
"Attached Records" Records the chat has attached from the start (see below) none
"Attached Files" Files the chat has attached from the start (see below) none
"Chat Message History Action" Action run for every message sent or received, for example to write the conversation into a history entity none
"Hide Conversation Placeholder" Hides the hint of an empty chat and releases its space off
"Input Placeholder" Hint text in the input field of the chat default text
"Send Button Text" Caption of the send button "Send"

In addition, the block has the settings every block has, except "Flush".

Attached records

Each entry is one of:

Entry Meaning
"Current Record" Attaches the record the form shows
"Entity" and "Record Id" Attaches a record of that entity. "Record Id" may also return several ids – as a JSON list or separated by comma, semicolon or line break.

Attached files

Each entry has a "Source":

Source Meaning
"Uploaded file" A file uploaded once in the editor. Pictures, PDF, text, Word and Excel files are accepted. Needs a storage for images and files in the global settings.
"Files of a files block" All files a Files Block keeps under an identifier: "Identifier", "File Provider" and "Provider Credentials" as on that block

Attached records and files stay attached when the user may not attach anything. They are then only invisible, and the user cannot remove them. "The chat must always know the contract, but users should not attach anything" is therefore attached entries plus "Enable Attach Record" and "Enable Attach File" set to false.


3. Behaviour

  • Height: the chat only fills the block when the block has a height or a maximum height. Without one, the block grows with the conversation – a long conversation pushes the form apart.
  • "Font Size", "Font Weight" and "Text Color" of the block apply to the messages.
  • History action: the action runs once when the user sends a message and once when the answer is complete. It receives the message in the special variables "AI Chat Message", "AI Chat Identifier", "AI Chat Message Direction" (Outgoing for the user, Incoming for the assistant), "AI Chat Message Timestamp" (UTC) and everything else – tool calls, token usage, model, attachments – as JSON in "AI Chat Message Event Data". In a form, the action runs against the record of the form, so the history can be linked to it. A failing history action does not stop the chat.

4. Example

Ticket assistant. "AI Assistant" = "Service Desk Assistant", "Chat Identification" = the record id of the ticket (one conversation per user and ticket), "Attached Records" = Current Record, "Attached Files" = the files of the files block with identifier attachments, "First Chat Message" = Summarise this ticket in three sentences, "Hide First Chat Message" on, "Size" height 480px.