
Overview
The Chat reply block is a comprehensive chat solution that can initialize conversations, add messages, and generate replies in a single block. It’s designed to handle the complete chat workflow efficiently. You can specify a conversation state variable to store the chat history, system prompt, message, and various configuration options. The block manages the conversation state and generates appropriate responses. You can also configure tools that the AI can use during the conversation, such as function tools and Knowledge Graphs.Common use cases
- Building complete chat applications
- Creating AI assistants with conversation management
- Implementing interactive workflows with chat capabilities
- Developing conversational interfaces with tool calling
How it works
- Conversation Object: A binding variable that stores the chat history and metadata. If not provided or empty, a new conversation will be created and stored in the state.
- System prompt: Set the context or behavior for the AI. Can be left empty if conversation is already initialized in state.
- Message: Enter the user’s message as an object with
role
andcontent
properties; for example,{"role": "user", "content": "What are the best practices for using the product?"}
. If you want to pass the user’s message from the Chatbot interface to the Chat reply block, you can use the@{payload}
variable. - Configuration: Set model (default:
palmyra-x5
), temperature (0-1), and max tokens (1-16384). - Use streaming: Choose whether to stream responses as they’re generated or wait for complete responses.
- Tools configuration: Configure tools that the AI can use during the conversation:
- Function tools: Define custom functions with parameters that the AI can call
- Graph tools: Connect to knowledge graphs for enhanced responses
- Tool routing: Control when and how tools are called during the conversation
- Tool responses: Handle and process the results returned from tool executions
- See tool calling for more information on how to configure tools.
Examples
Customer support chatbot
This example shows a customer support chatbot that can handle conversations and route to human agents if needed. Interface:- A Chatbot block that displays the chat interface.
- UI Trigger → Customer sends message through chat interface
- Chat reply → Processes message and generates AI response
- Classification → Determines if human agent is needed
- Conditional routing → Routes to human agent via HTTP Request block if a human agent is needed. Otherwise, the workflow starts again with the next user message.
- Conversation Object:
@{chat}
- System prompt:
- Message:
@{payload}
. This passes the user’s message from the Chatbot interface to the Chat reply block.

Connect a chatbot to a Knowledge Graph
This example shows a chatbot that can answer questions about domain-specific knowledge within a Knowledge Graph. Interface:- A Chatbot block that displays the chat interface.
- UI Trigger → Customer sends message through chat interface
- Chat reply → Processes message and generates AI response. Configured with a Knowledge Graph tool to answer questions about the company’s products and services.
- Conversation Object:
@{chat}
- System prompt:
- Tools:
- Tool type:
Knowledge Graph
- Tool name: A name to help you identify the tool in the response.
- Graph id(s): The list of Knowledge Graphs to use. You can select from a list of available Knowledge Graphs.
- Tool type:

Fields
Name | Type | Control | Default | Description | Options | Validation |
---|---|---|---|---|---|---|
Conversation Object | Binding | - | - | The variable that has your conversation object. | - | - |
System prompt | Text | Textarea | "" | A system prompt to set the context for the conversation. Can be left empty if conversation is already initialized in state. | - | - |
Message | Object | - | - | An array with messages or a variable to contain save your conversation as an object. | - | - |
Initial model | Model Id | - | palmyra-x5 | - | - | - |
Initial temperature | Number | - | 0.7 | - | - | Range: 0 to 2 |
Initial max tokens | Number | - | 1024 | - | - | Range: 1 to 16384 |
Use streaming | Boolean | - | yes | If set to ‘yes’, the block will stream the reply as it is generated. If set to ‘no’, it will wait for the entire reply to be generated before returning. | - | - |
Tools | Tools | - | - | - | - |
End states
Below are the possible end states of the block call.Name | Field | Type | Description |
---|---|---|---|
Tools | tools | dynamic | Run associated tools. |
Success | - | success | If the function doesn’t raise an Exception. |
Error | - | error | If the function raises an Exception. |
dynamic
end state means that the exact values of this end state change based on how you define the block.
The output of the Chat reply block is a string with the most recent response from the AI to the user’s message. You can access the output in the next block with the @{result}
variable.