Overview
This node serves a customizable React chat interface as static content. It is designed to provide a chat frontend that connects to a specified chat API backend, allowing users to interact with an AI assistant or chat service. The node supports customization of the chat interface appearance, welcome messages, agent identification, feedback mechanisms, and footnotes for agent messages. It is useful for scenarios where you want to embed or serve a chat UI that communicates with an AI or chat backend, such as customer support bots, AI assistants, or interactive chat applications.
Use Case Examples
- Serving a chat interface at the root path '/' that connects to a custom AI chat API URL.
- Customizing the chat interface with a specific chat title, welcome message, and custom favicon.
- Enabling feedback buttons for users to provide thumbs up/down on AI responses.
- Adding a footnote disclaimer under agent messages with options to control its display timing and collapsibility.
Properties
| Name | Meaning |
|---|---|
| Request Path | The URL path at which the chat interface static content is served (e.g., '/', '/assets/style.css'). This determines what path the node responds to with the chat interface or its assets. |
| Chat API URL | The backend API URL that the chat interface will use to send and receive chat messages. |
| Chat Title | The title displayed in the chat interface header. |
| Webhook URL | The full webhook URL used for static file references. All asset paths will be converted to webhook calls with a query parameter for the path. |
| Agent SID | Optional user identifier (such as email, username, or ID) included in chat API requests to identify the agent or user. |
| Custom Favicon | A base64 encoded PNG image string to use as a custom favicon in the chat interface. |
| Welcome Message | An optional welcome message in ChatResponse JSON format that is automatically displayed when the user opens the chat. Supports output text, options, references, disabling input, and footnote display. |
| Enable Agent Message Footnote | Boolean flag to enable displaying a footnote under every agent message. |
| Agent Message Footnote | Optional markdown-supported footnote message shown under every agent message. |
| Footnote Title | Title displayed above the footnote content. |
| Footnote Collapsible | Boolean flag to allow users to expand or collapse the footnote content. |
| Show Footnote | Controls when the footnote is displayed in the message timeline: immediately, after the AI response is fully received, or only when the API response includes a showFootnote flag. |
| Enable Feedback | Boolean flag to enable thumbs up/down feedback icons for AI responses. |
| Thumbs Up Feedback URL | URL to POST positive feedback data when thumbs up is clicked. |
| Thumbs Down Feedback URL | URL to POST negative feedback data when thumbs down is clicked. |
| Light Theme Colors | Collection of HSL color values to customize the light theme appearance of the chat interface, including background, foreground, card, primary, secondary, muted, border, and input colors. |
| Dark Theme Colors | Collection of HSL color values to customize the dark theme appearance of the chat interface, including background, foreground, card, primary, secondary, muted, border, and input colors. |
Output
JSON
statusCode- HTTP status code of the served content (e.g., 200 for success, 404 for not found).content- Base64 encoded content of the served static file (HTML, CSS, JS, or other assets).contentType- MIME type of the served content (e.g., text/html, text/css, application/javascript).headers- HTTP headers to include in the response, such as cache control, ETag, and custom headers for config hash and build timestamp._cacheBreaker- Internal cache breaker string combining timestamp and config hash to force cache invalidation._configHash- Hash of the configuration used to serve the content, useful for cache validation._buildTimestamp- Timestamp of the build or serve time, used for cache control and validation.
Dependencies
- Node.js 'fs', 'path', 'crypto', and 'mime-types' modules
- An API URL for the chat backend (configured by user)
Troubleshooting
- If the requested path does not exist in the static assets, the node returns a 404 Not Found response with no-cache headers.
- Ensure the Chat API URL is reachable and correctly configured to avoid chat communication failures.
- If custom favicon or welcome message JSON is malformed, the chat interface may not render correctly.
- When enabling feedback URLs, ensure the URLs accept POST requests and handle feedback data properly.