For UI configuration, settings, and styling, see the Chat component in UI Designer.
Key features
Real-time messaging
Send and receive messages instantly with streaming support
AI agent integration
Connect to workflows powered by AI agents
Session management
Automatic session handling and persistence across page refreshes
Message history
Retrieve and display conversation history on refresh
Knowledge Base integration
Ground AI responses in your organization’s data using RAG capabilities
Reasoning transparency
Show AI reasoning steps to users for trust and transparency
Display types
When adding a Chat component, you choose a Chat Display Type that determines how the chat renders within your app.
- Fill
- Overlay
Renders within the parent component, filling the available space.
- Can be a child of any container or card
- Embeds directly into the page layout
- Best for dedicated chat pages or inline chat experiences
You can change the chat display type after creation if needed.
Global component
Available starting with FlowX.AI 5.5.0
- The chat appears in the Global Components section of the left navigation panel
- It persists as users navigate between pages in the UI Flow
- You can attach or detach the chat from specific pages to control where it appears
- The chat maintains its conversation state across page navigation
Sizing
The Chat component and floating action button support fixed sizing, allowing you to set a specific width and/or height value for precise control over the chat container dimensions.Subcomponents
Enhanced in FlowX.AI 5.5.0The Chat component includes specialized subcomponents for reasoning display, error handling, and message regeneration.
| Subcomponent | Description |
|---|---|
| Header | Configurable header with avatar, title, subtitle, new chat button, fullscreen toggle, and dock/collapse controls |
| Messages | Message display with sender/receiver differentiation, markdown rendering, and avatar support |
| Reasoning | Displays AI reasoning steps (thinking indicators) during response generation |
| Input | Message input field with configurable placeholder and multiline support |
Reasoning display
The reasoning subcomponent shows users how the AI agent is processing their request. When enabled, a thinking indicator appears while the agent works through its reasoning steps.| Property | Description |
|---|---|
| reasoning | Toggle to show/hide reasoning steps in the chat |
| thinkingMessage | Custom message to display during reasoning (e.g., “Thinking…”) |
Error handling and regeneration
When a message fails to generate, the chat displays an error state with an option to retry:| Property | Description |
|---|---|
| errorMessage | Custom error message to display on failure |
| canRegenerate | Enable the regenerate button on failed messages |
| regenerateLabel | Custom label for the regenerate button |
Chat configuration
ThechatConfig object controls the behavior and appearance of the chat:
| Property | Type | Description |
|---|---|---|
welcomeMessage | string | Initial message shown when the chat opens |
thinkingMessage | string | Message displayed during AI reasoning |
title | string | Header title text |
subtitle | string | Header subtitle text |
showChatIcon | boolean | Show/hide the chat icon |
showSeparator | boolean | Show/hide the separator between messages |
newChatLabel | string | Label for the new chat button |
errorMessage | string | Message shown on errors |
canRegenerate | boolean | Enable message regeneration on failure |
regenerateLabel | string | Label for the regenerate button |
inputPlaceholder | string | Placeholder text for the input field |
maxInputRows | number | Maximum number of rows for multiline input |
Runtime behavior
Starting a chat
The initial system message can be configured in the workflow to provide a customized greeting or conversation starter.
Message exchange
- Sending messages
- Receiving messages
- User types message in input field
- Message is sent to the workflow via Chat Input node
- Workflow processes the message through AI nodes
- Response is returned to the chat interface
Session management
Session persistence
sessionIdstored in browser session/local storage- Enables conversation continuity across page refreshes
- Session data includes message history
Message history retrieval
- On page refresh, system loads existing
sessionId - Retrieves and displays previous messages
- Restores conversation state automatically
Data storage
Chat sessions are persisted in the FlowX Database:Each chat session is stored as a document containing the complete chat history. The chat component works with the FlowX Database to save chat sessions, where each session document contains the full conversation record.
| Data Element | Storage Location | Description |
|---|---|---|
| Session ID | Browser storage + Database | Unique identifier linking client to server-side session |
| Message history | FlowX Database | Complete record of all messages in the conversation |
| Session metadata | FlowX Database | Timestamps, workflow reference, user information |
Custom chat persistence workflow
For advanced use cases where you need full control over chat session storage, you can build a custom workflow that manages chat persistence using FlowX Database. This approach allows you to:- Customize the chat data model
- Add additional metadata to chat sessions
- Integrate with external systems
- Implement custom session management logic
Workflow overview
The chat persistence workflow handles two main scenarios:- Loading chat history - When a user returns to an existing chat session
- Processing new messages - When a user sends a new message
Setting up the FlowX database data source
Create the data source
Navigate to Integrations → Data Sources → Add New Data Source and select FlowX Database.
Configure the collection
Name the collection (e.g.,
chat) and define the schema based on your data model.Building the workflow
Create the workflow
Create a new workflow in Integration Designer with the following input parameters:The
action parameter determines whether to load history (LOAD_HISTORY) or process a new message.Add Get chat session node
Add a Database Operation node to retrieve the existing session:
| Property | Value |
|---|---|
| Operation | db.chat.findOne |
| Description | Chat session history |
| Parameter: chatSessionId | ${chatSessionId} |
| Response Key | chatSession |
Add action type condition
Add a Condition node to check the action type:
- If true: Route to the “Return chat history” end node
- Else: Continue to message processing
Add Return chat history end node
For the
LOAD_HISTORY branch, add an End Flow node that returns the chat history:Add session exists condition
For new messages, add another Condition node to check if the session exists:
Add Create chat session node
If the session doesn’t exist, add a Database Operation node to create it:
| Property | Value |
|---|---|
| Operation | db.chat.insertOne |
| Description | Create chat session |
| Parameter: chatSessionId | ${chatSessionId} |
| Parameter: history | [{ "actor": "human", "message": "${humanMessage}" }] |
| Response Key | responseKey |
Add Update chat session node
Add a Database Operation node to save the updated history:
| Property | Value |
|---|---|
| Operation | db.chat.updateOne |
| Description | Update chat session |
| Parameter: chatSessionId | ${chatSessionId} |
| Parameter: history | ${updatedHistory} |
| Response Key | responseKey |
Chat session data model example
UI Flow integration
The Chat component integrates with UI Flows: Chat Component Wrapper- Chat component is embedded within UI Flow structure
- Follows UI template hierarchy
- Shares session context with other components
Event-based communication
Event-based communication
- Components emit and listen for custom events
- Enables loosely coupled interactions
- Example: Chat triggers process start event
On-demand communication
On-demand communication
- Direct component-to-component calls
- For tightly integrated features
- Example: Chat updates task management state
Audit and debugging
UI Flows audit
Chat sessions tracking
All chat sessions are logged in UI Flow audit:
- Track when chats are started
- Monitor active and completed sessions
- View session duration and message count
Console logging
Access detailed execution information:
- View workflow execution logs
- Debug conversation flow
Debug interface
UI Flow Sessions Console Access comprehensive debugging tools through the UI Flow Sessions panel:- Nodes
- Logs
- Input/Output
Track workflow execution with node-by-node timing:
| Node | Typical Duration |
|---|---|
| Start | 0 ms |
| Get chat session | ~133 ms |
| Check action type | ~52 ms |
| Return chat history | ~60 ms |
SDK integration
The Chat component is available through the FlowX SDKs for both Angular and React applications.Angular SDK
Use the
FlxChatRendererComponent in Angular applicationsReact SDK
Use the
FlxChatRenderer component in React applicationsKey SDK parameters
| Parameter | Description | Required |
|---|---|---|
apiUrl | Your base FlowX API URL | ✅ |
authToken | Authorization token from auth provider | ✅ |
projectId | The FlowX project ID | ✅ |
workspaceId | The workspace ID | ✅ |
source | Source object with workflow type and ID | ✅ |
chatConfig | Chat configuration object (welcome message, title, etc.) | ❌ |
themeId | Theme identifier for styling | ❌ |
language | Language for localization | ❌ |
For the complete list of parameters and usage examples, see the respective SDK documentation pages linked above.
Best practices
Workflow design
Do
- Keep chat workflows focused on a single use case
- Use clear, natural language prompts
- Test with various user inputs
- Handle errors gracefully with helpful messages
Don't
- Don’t create overly complex conversation flows
- Don’t send responses from multiple Custom Agent nodes
User experience
Do
- Provide clear initial greeting messages
- Show typing indicators during processing
- Display helpful error messages
- Allow users to restart conversations
Don't
- Don’t make users wait too long for responses
- Don’t use technical jargon in agent messages
- Don’t lose conversation context
Performance
Do
- Optimize workflow execution time
- Cache frequently accessed data
- Limit message history retrieval
Don't
- Don’t load entire conversation history every time
- Don’t make unnecessary API calls
Troubleshooting
Chat not loading
Chat not loading
Possible causes:
- Workflow is not properly configured
- Workflow is not published
- UI Flow has incorrect agent ID/workflow name
- Verify the workflow is properly configured
- Check that the workflow is published and active
- Ensure UI Flow has correct agent ID/workflow name
Messages not sending
Messages not sending
Possible causes:
- Network connectivity issues
- Workflow is in error state
- Configuration errors
- Check network connectivity
- Verify workflow is not in error state
- Review workflow console logs for errors
Session lost on refresh
Session lost on refresh
Possible causes:
- sessionId is not persisted in storage
- Browser storage permissions issues
- Ensure sessionId is persisted in storage
- Check browser storage permissions
- Verify session management configuration
Knowledge Base integration
The Chat component can use Knowledge Bases to provide contextual, grounded AI responses.How it works
Create Knowledge Base
Set up a Knowledge Base as a Data Source in Integration Designer and upload relevant content
Supported file formats
| Format | Description |
|---|---|
| Standard PDF documents | |
| Markdown | .md files with formatted text |
| Word | Microsoft Word documents (.docx) |
| Excel | Spreadsheet data (.xlsx) |
| PowerPoint | Presentation files (.pptx) |
| Images | Image files with text content |
Configuration options
| Option | Description |
|---|---|
| Minimum relevance | Threshold for chunk relevance scores (0-1) |
| Number of responses | Limit how many relevant chunks are returned to the LLM |
| Content updates | Use workflows to dynamically append, update, or replace content |
Knowledge Bases provide Retrieval-Augmented Generation (RAG) capabilities, ensuring AI responses are grounded in your organization’s actual data.
Knowledge Base Documentation
See the complete Knowledge Base documentation for setup guides and best practices.
Platform availability
- Web
- Mobile
Available in v5.5.0 ✓
- Fill and Overlay display types (Floating, Full Screen)
- Complete feature set
- Angular and React renderer support
Related resources
Chat UI configuration
Settings, styling, and theme configuration
Chat interface concepts
High-level integration patterns
Custom Agent Node
Custom Agent nodes in Integration Designer
Knowledge Base
Configure knowledge bases for grounded AI responses
Conversational workflows
Build multi-turn chat experiences with session memory and intent routing

