Overview
The Chat component serves as the primary interface for conversational AI experiences in FlowX. It allows users to interact with AI agents through natural language conversations, enabling use cases such as customer support, data collection, process guidance, and intelligent assistance.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
Customizable UI
Themeable components with independent styling for agent and user messages
Message history
Retrieve and display conversation history on refresh
Knowledge Base integration
Ground AI responses in your organization’s data using RAG capabilities
Configurable welcome message
Personalized greetings using data from UI Flow data store
Configuration
Component setup
To add a Chat component to your UI Flow:Select or create a UI Flow
Select an existing UI flow or create a new one. This opens the UI Designer where you’ll see the Config and Runtime tabs at the top right for switching between configuration and preview modes.

Open UI Assets panel
In the left sidebar, expand the UI Assets panel. The Chat component is located alongside other common components like:
- Table, Collection, Task Management, and Custom Components

Required configuration
Agent ID / Workflow NameSpecify the workflow that will handle the chat interactions.
Display Mode
| Version | Available Modes |
|---|---|
| 5.4 | Full screen only |
| 5.5+ | Full screen, inline, modal, sidebar (planned) |
Workflow Input/Output FormatThe Chat component expects a defined input and output format within the connected workflow. The workflow must be configured to:
- Accept the chat message as input
- Return the agent response in the expected format
The workflow handles the communication between the Chat UI and the AI agent, processing user messages and returning appropriate responses.
Welcome MessageConfigure a customizable welcome message that displays when users first open the chat. The welcome message can be parameterized using values from the UI Flow data store.Example:
"Hello ${customerName}, how can I help you today?"Usage modes
The Chat component supports two usage modes:Standalone component
Use the Chat as a dedicated full-screen experience, ideal for focused conversational interactions
Embedded in UI Flow
Embed the Chat within a larger UI Flow, combining it with other components like forms and displays
Component hierarchy
The Chat component consists of several configurable sub-components. In the UI Designer Navigation panel, the component hierarchy appears as:
UI designer properties
Configure component behavior and content through the Settings tab in UI Designer (UI Flows → select a UI flow → select component):Chat
Chat
| Property | Description |
|---|---|
| Workflow | Select the workflow that handles chat interactions |
| Welcome Message | Initial greeting displayed when users open the chat (e.g., “Hello! How can I help you today?”) |
| Thinking Message | Text shown while the AI agent is processing a response (default: “Thinking…”) |

The Advanced section contains the Data Test ID option for testing purposes.
Header
Header
| Property | Description |
|---|---|
| Button Label | Text for the “New chat” button (default: “New chat”) |
| Title | Main title text displayed in the header (e.g., “My chat”) |
| Subtitle | Secondary text below the title for additional context |
| Show Chat Icon | Toggle to display/hide the chat avatar icon |
| Show Separator | Toggle to display/hide the separator line below the header |

Agent Message
Agent Message
| Property | Description |
|---|---|
| Show Avatar | Toggle to display/hide the agent avatar icon |

User Message
User Message
The User Message sub-component has no configurable properties in the Settings tab. Visual styling can be configured through Theme Admin.
Input
Input
| Property | Description |
|---|---|
| Placeholder | Hint text shown in the empty input field (e.g., “Ask me anything…”) |

Theme configuration
Configure visual styling through Theme Admin (Design Assets → Themes → Components → Chat):Chat
Chat
Common Properties:
| Property | Description | Default |
|---|---|---|
| Padding | Spacing around content (4 sides) | 0 |
| Border Width | Container border thickness | 0 px |
| Border Radius | Corner rounding | 0 px |
| Border Color | Border color | Transparent |
| Gap | Spacing between elements | 0 px |
| Background Color | Container background | Shades (100) |
| Shadow | Drop shadow effect | None |
Chat Header
Chat Header
Common Properties:
Title:
Subtitle:
Separator:
Icons:
Preview states: Default, Default (No Avatar), Default (No separator)
| Property | Description | Default |
|---|---|---|
| Padding | Spacing around content (4 sides) | 16/0/0/16 |
| Gap | Spacing between elements | 8 px |
| Property | Description | Default |
|---|---|---|
| Text Style | Typography preset | Heading/H4 - bold |
| Text Color | Title text color | Neutrals (900) |
| Property | Description | Default |
|---|---|---|
| Text Style | Typography preset | Paragraph/P1 - regular |
| Text Color | Subtitle text color | Neutrals (500) |
| Property | Description | Default |
|---|---|---|
| Height | Separator thickness | 1 px |
| Color | Separator color | Neutrals (200) |
| Property | Description |
|---|---|
| Header Icon | Customizable chat avatar icon |
Messages
Messages
Common Properties:
| Property | Description | Default |
|---|---|---|
| Padding | Spacing around content (4 sides) | 24/0/0/24 |
| Border Width | Container border thickness | 0 px |
| Border Color | Border color | Transparent |
| Border Radius | Corner rounding | 0 px |
| Gap | Spacing between messages | 8 px |
| Background Color | Messages area background | Shades (100) |
Agent Message
Agent Message
Common Properties:
Icons:
Preview states: Default, Default (No Avatar), Thinking, Thinking (No Avatar)
| Property | Description | Default |
|---|---|---|
| Padding | Spacing around content (4 sides) | 0 |
| Border Width | Message bubble border thickness | 0 px |
| Border Color | Border color | Transparent |
| Border Radius | Corner rounding | 0 px |
| Gap | Spacing between avatar and text | 8 px |
| Background Color | Message bubble background | Transparent |
| Text Style | Typography preset | Paragraph/P1 - medium |
| Text Color | Message text color | Shades (900) |
| Property | Description |
|---|---|
| Agent Icon | Customizable agent avatar icon |
User Message
User Message
Common Properties:
Preview states: Default
| Property | Description | Default |
|---|---|---|
| Padding | Spacing around content (4 sides) | 8/12/12/8 |
| Border Width | Message bubble border thickness | 1 px |
| Border Radius | Corner rounding | 8 px |
| Border Color | Border color | Neutrals (200) |
| Background Color | Message bubble background | Neutrals (100) |
| Text Style | Typography preset | Paragraph/P1 - medium |
| Text Color | Message text color | Shades (900) |
User Input Area
User Input Area
Common Properties:
Icons:
| Property | Description | Default |
|---|---|---|
| Padding | Spacing around content (4 sides) | 16/16/16/16 |
| Border Width | Container border thickness | 1 px |
| Border Radius | Corner rounding | 12 px |
| Border Color | Border color | Transparent |
| Background Color | Input area background | Neutrals (100) |
| Gap | Spacing between elements | 8 px |
| Property | Description |
|---|---|
| Send Message Icon | Customizable send button icon |
Input
Input
Common Properties:
State-specific styling:
Preview states: Default, Default (Disabled)
| Property | Description | Default |
|---|---|---|
| Font | Typography preset | Paragraph/P1 - regular |
| Accent Color | Focus/active accent color | Primary (500) |
| State | Properties |
|---|---|
| Default | Placeholder Color |
| Focused | Color, Placeholder Color |
| Disabled | Color, Placeholder Color |
| Filled | Color |
| Hovered | Color, Placeholder Color |
The Theme Admin provides a Web platform toggle, allowing you to preview and configure styles specifically for web applications.
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
Here’s an example of how a chat session document looks in the FlowX Database:This custom workflow approach gives you full flexibility over chat data management. For most use cases, the transparent persistence provided by the platform is sufficient. Use custom workflows when you need to extend the default behavior or integrate with external systems.
UI Flow integration
The Chat component integrates seamlessly 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
- Documents
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 |
Session status badges: Sessions display status badges like FINISHED to quickly identify completed conversations.
Theming
Theme elements
The Chat component supports comprehensive theming:- System theme
- Custom themes
- Default theme provided out-of-the-box
- Includes chat-specific substitution tags
- System media items for icons and avatars
Theme configuration
Theme Admin Interface Configure chat theming through the Theme Admin:- Visual theme editor with live preview
- Save and apply custom themes
- Consistent styling across all chat instances
- System tags migration for chat elements
- System icons migration
- Themes migration from previous versions
SDK integration
The Chat component is available through the FlowX SDKs for both Angular and React applications. For detailed implementation guides, parameters, and configuration options, refer to the SDK documentation: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,
chatConfig options, 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
- Maintain consistent agent personality
Don't
- Don’t make users wait too long for responses
- Don’t use technical jargon in agent messages
- Don’t lose conversation context
- Don’t hide important information
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
- Don’t process messages synchronously if avoidable
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
- Session management misconfiguration
- Ensure sessionId is persisted in storage
- Check browser storage permissions
- Verify session management configuration
Roadmap
Version 5.5 (Planned)
File upload support
Allow users to upload files in chat conversations
Enhanced chat audit
Detailed session analytics and reporting
Additional display modes
Inline, modal, and sidebar display options
Improved debugging tools
Enhanced debugging and visualization
Mobile support
Chat component availability on iOS and Android
Future enhancements
- Multi-language support: Built-in translation capabilities
- Voice input/output: Speech-to-text and text-to-speech
- Rich message types: Cards, carousels, buttons
- Agent handoff: Transfer to human agents
- Sentiment analysis: Real-time conversation monitoring
Knowledge Base integration
For grounded and consistent AI responses, the Chat component can leverage Knowledge Bases to provide contextual information to AI agents. The Knowledge Base is a crucial feature that provides grounded and consistent answers from agents.How it works
Create Knowledge Base
Set up a Knowledge Base as a Data Source in Integration Designer and upload relevant content
Link to Custom Agent
Connect the Knowledge Base to Custom Agent nodes in your workflow. The Knowledge Base is used to retrieve context before engaging the large language model.
Supported file formats
The Knowledge Base supports multiple file formats for content ingestion:| 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 | Set a threshold for chunk relevance scores (0-1). Fine-tune to filter out low-quality matches. |
| Number of responses | Limit how many relevant chunks are returned to the LLM |
| Content updates | Use scheduled jobs or workflows to dynamically append, update, or replace content. Changes are immediately reflected—no retraining needed. |
Relevance scoring
The current relevance computation is semantic:How semantic scoring works
How semantic scoring works
- Text is transformed into a number vector (embedding)
- The system calculates the distance between the query vector and chunk vectors
- This acts as a measure of synonymy—finding semantically similar content even with different wording
Future scoring enhancements (planned)
Future scoring enhancements (planned)
- Keyword-based scoring: Match based on specific keywords
- Question-answer pair scoring: Evaluate how well Q&A pairs work together
- User-controlled similarity: More control over how similarity scores are calculated
Knowledge Bases provide Retrieval-Augmented Generation (RAG) capabilities, ensuring AI responses are grounded in your organization’s actual data rather than relying solely on the LLM’s training data.
Knowledge Base Documentation
See the complete Knowledge Base documentation for setup guides and best practices.
Platform availability
- Web
- Mobile
Available in v5.4.0 ✓
- Full screen display mode
- Complete feature set
- Angular and React renderer support
- Can be used as standalone component or embedded within a UI Flow

