Skip to content

Commit c8dedce

Browse files
Merge pull request #6779 from FlowFuse/ff-expert
FlowFuse Expert Document for Chat Interface
2 parents 9216c01 + aa745ff commit c8dedce

8 files changed

Lines changed: 298 additions & 76 deletions

File tree

docs/admin/introduction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,10 @@ including what Instance Types are available and any limits that should be applie
186186
Provides a Team scoped shared SQL Relational Database (Requires specific configuration). More details [here](../user/ff-tables.md)
187187
- **Assistant Inline Code Completion**
188188

189-
Allows LLM assistance when writing Functions nodes (requires a token from FlowFuse Support and available to Enterprise License holders). More details [here](../user/expert.md)
189+
Allows LLM assistance when writing Functions nodes (requires a token from FlowFuse Support and available to Enterprise License holders). More details [here](/docs/user/expert/)
190190
- **Generated Snapshot Descriptions**
191191

192-
Enables the creation of Generative AI descriptions of Snapshots (requires a token from FlowFuse Support and available to Enterprise License holders). More details [here](../user/expert.md)
192+
Enables the creation of Generative AI descriptions of Snapshots (requires a token from FlowFuse Support and available to Enterprise License holders). More details [here](/docs/user/expert/)
193193

194194
### Managing Instance Types
195195

docs/user/expert/chat.md

Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
---
2+
navTitle: Chat Interface
3+
---
4+
5+
# Chat Interface
6+
7+
The FlowFuse Expert chat interface is your conversational AI companion that you can open directly in the Node-RED editor. While other FlowFuse Expert features (like inline code completions and next-node prediction) work passively in the Node-RED Editor, the chat interface is where you actively engage the AI - asking questions, exploring your flows, and gaining insights from your live data.
8+
9+
## Opening the Chat Interface
10+
11+
To open the chat, first open your Node-RED instance using the Open Editor button. This launches Immersive Mode.
12+
13+
## Chat Modes
14+
15+
The chat interface operates in two distinct modes. You can switch between them using the **Mode Selector** at the top of the Expert panel.
16+
17+
<div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 20px 0;">
18+
19+
<a class="assistant-feature" href="#support-mode">
20+
<svg width="48" height="48" viewBox="0 0 24 24" class="icon-stroke" xmlns="http://www.w3.org/2000/svg">
21+
<path d="M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z" stroke-width="2"/>
22+
<path d="M8 9h8M8 13h6" stroke-width="1.5" stroke-linecap="round"/>
23+
</svg>
24+
<label style="margin: 10px 0; font-size: 16px; color: #333;">Support Mode</label>
25+
</a>
26+
27+
<a class="assistant-feature" href="#insights-mode">
28+
<svg width="48" height="48" viewBox="0 0 24 24" class="icon-stroke" xmlns="http://www.w3.org/2000/svg">
29+
<circle cx="12" cy="12" r="3" stroke-width="2"/>
30+
<path d="M12 2v3M12 19v3M4.22 4.22l2.12 2.12M17.66 17.66l2.12 2.12M2 12h3M19 12h3M4.22 19.78l2.12-2.12M17.66 6.34l2.12-2.12" stroke-width="2" stroke-linecap="round"/>
31+
</svg>
32+
<label style="margin: 10px 0; font-size: 16px; color: #333;">Insights Mode</label>
33+
</a>
34+
35+
</div>
36+
37+
### Support Mode
38+
39+
**Support mode** is for flow-building assistance. Use it when you need help understanding, building, or debugging your Node-RED flows. In this mode, the Expert draws on its knowledge of Node-RED, your installed palette, and the context of your current flows to answer questions and provide guidance.
40+
41+
Typical use cases in Support mode:
42+
- "How do I convert data to CSV for writing to file & do you have any flow examples?"
43+
- "Explain what this flow is doing"
44+
- "Why is this node outputting a number instead of a string?"
45+
- "Is `node-red-contrib-string` node installed on this instance?"
46+
47+
#### Context: What the Expert Can See
48+
49+
Support mode becomes significantly more helpful when the Expert has context about your environment. Context is not automatic, you choose what to share with the Expert depending on what you need help with.
50+
51+
<div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 20px 0;">
52+
53+
<a class="assistant-feature" href="#palette-context">
54+
<svg width="48" height="48" viewBox="0 0 24 24" class="icon-stroke" xmlns="http://www.w3.org/2000/svg">
55+
<rect x="3" y="3" width="7" height="7" stroke-width="2" rx="1"/>
56+
<rect x="14" y="3" width="7" height="7" stroke-width="2" rx="1"/>
57+
<rect x="3" y="14" width="7" height="7" stroke-width="2" rx="1"/>
58+
<rect x="14" y="14" width="7" height="7" stroke-width="2" rx="1"/>
59+
</svg>
60+
<label style="margin: 10px 0; font-size: 16px; color: #333;">Palette Context</label>
61+
</a>
62+
63+
<a class="assistant-feature" href="#flow-context">
64+
<svg width="48" height="48" viewBox="0 0 24 24" class="icon-stroke" xmlns="http://www.w3.org/2000/svg">
65+
<path d="M5 12h14M12 5l7 7-7 7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
66+
</svg>
67+
<label style="margin: 10px 0; font-size: 16px; color: #333;">Flow Context</label>
68+
</a>
69+
70+
<a class="assistant-feature" href="#debug-context">
71+
<svg width="48" height="48" viewBox="0 0 24 24" class="icon-stroke" xmlns="http://www.w3.org/2000/svg">
72+
<path d="M12 8v4l3 3" stroke-width="2" stroke-linecap="round"/>
73+
<circle cx="12" cy="12" r="9" stroke-width="2"/>
74+
<path d="M8 2l1.5 2M16 2l-1.5 2" stroke-width="1.5" stroke-linecap="round"/>
75+
</svg>
76+
<label style="margin: 10px 0; font-size: 16px; color: #333;">Debug Context</label>
77+
</a>
78+
79+
</div>
80+
81+
##### Palette Context
82+
83+
To add Palette Context, click the **Resource Selector** button (paperclip icon) in the chat interface and select **Palette**. Once added, the Expert has access to information about the nodes installed in your Node-RED instance - including installed packages and their versions.
84+
85+
This allows you to ask questions like:
86+
- "Is my palette up to date?"
87+
- "What version of node-red-dashboard is installed?"
88+
- "Do I have a node available for reading from a PostgreSQL database?"
89+
90+
The Expert can use palette context to tailor its suggestions - for example, recommending nodes you actually have installed rather than suggesting ones that are not available.
91+
92+
![Palette Context discussion with the FlowFuse Expert.](../images/assistant/palette-context.gif){data-zoomable}
93+
94+
##### Flow Context
95+
96+
To add Flow Context, select the flow you want the Expert to reference from the flow tabs in the Node-RED editor. The selected flow is then added as context for the Expert to read and reason about.
97+
98+
This makes it possible to ask questions directly about your flows without having to copy and paste JSON or describe your configuration manually.
99+
100+
This allows you to ask questions like:
101+
- "What does this flow do?"
102+
- "Why does this flow output a number instead of a string?"
103+
- "Is there something wrong with this flow? I don't seem to get an output from the debug node!"
104+
105+
Flow Context is what makes the Expert genuinely useful as a debugging and code review tool - it can see the same flow you're looking at and reason about it directly.
106+
107+
![FlowFuse Context discussion with the FlowFuse Expert.](../images/assistant/flow-context.gif){data-zoomable}
108+
109+
##### Debug Context
110+
111+
To add Debug Context, you have 2 options:
112+
1. Add individual log entries by clicking the ➕ button that appears over your debug message
113+
2. Click the **Resource Selector** button (paperclip icon) in the chat interface and select **Add Debug Logs**.
114+
115+
Once added, the Expert has access to the messages and output currently captured in your Node-RED debug panel.
116+
117+
This allows the Expert to reason directly about the data or errors you are getting from your nodes at runtime, not just the structure of the flow itself.
118+
119+
This allows you to ask questions like:
120+
- "Why is this debug output a number instead of a string?"
121+
- "What does this error message in the debug panel mean?"
122+
- "Is the payload structure here what my downstream node expects?"
123+
124+
Debug Context is especially useful in combination with Flow Context - together they give the Expert both the structure of your flow and the actual data it is producing, making debugging significantly more effective.
125+
126+
![Debug Context discussion with the FlowFuse Expert.](../images/assistant/expert-debug-context.gif){data-zoomable}
127+
128+
#### Resetting Context
129+
130+
If the Expert starts giving unexpected or inconsistent answers, it may be due to accumulated context from earlier in the conversation influencing its responses. Use the **Start Over** button to clear the conversation and start fresh with a clean context.
131+
132+
### Insights Mode
133+
134+
**Insights mode** connects the Expert to your live data via **Model Context Protocol (MCP)**. Use it when you want to query, analyze, or interact with real-world data - not just your Node-RED flows.
135+
136+
In Insights mode, you first select an MCP Server that you've built using [FlowFuse MCP Server Nodes](https://flowfuse.com/node-red/flowfuse/mcp/). The Expert can then use the tools and resources exposed by that server to answer questions against your live operational data. If you haven't built an MCP Server yet, see the guide on [building an MCP Server using FlowFuse](https://flowfuse.com/blog/2025/10/building-mcp-server-using-flowfuse/).
137+
138+
Typical use cases in Insights mode:
139+
- You have an MCP Resource named `production_lines_facilities_list` that returns a list of your production lines, their facility names and the facility types (stamping, assembly, packaging etc)
140+
- You can ask: "List all stamping facilities on our production lines"
141+
- You have added an MCP Tool named `get_production_live_state`
142+
-You can ask: "Tell me which of any of my assembly facilities are running and at what speed"
143+
- You have added an MCP tool named `get_production_oee` that
144+
- You can ask: "Show me the worst 3 OEE results for all production line facilities"
145+
146+
> **Note:** Insights mode is currently in Beta. Capabilities are actively being expanded.
147+
148+
**To switch to Insights mode:**
149+
1. Open the FlowFuse Expert panel
150+
2. Use the **Mode Selector** to switch from "Chat" to "Insights"
151+
3. Select the MCP Server you want to query
152+
4. Ask your question
153+
154+
## Writing Better Queries
155+
156+
The quality of the Expert's responses depends heavily on how your questions are phrased. The more specific and contextual your query, the more accurate and actionable the answer.
157+
158+
Here are some common patterns to improve your queries:
159+
160+
### Be specific about what you're referring to
161+
162+
Vague references like "it", "this", or "that" require the Expert to guess what you mean. Name the thing explicitly.
163+
164+
| Less effective | More effective |
165+
|---|---|
166+
| "Is it up to date?" | "Is my palette up to date?" |
167+
| "What does this mean?" | "What does this log entry mean?" |
168+
| "Why did this happen?" | "Why did this error log occur?" |
169+
170+
### Describe the actual problem, not just a symptom
171+
172+
If something isn't behaving as expected, describe what you expected versus what you got.
173+
174+
| Less effective | More effective |
175+
|---|---|
176+
| "This doesn't work" | "My flow should output a string but it is outputting a number" |
177+
| "The node is broken" | "The HTTP Request node is returning a 401 status code" |
178+
179+
### Include relevant details upfront
180+
181+
The Expert works best when it doesn't have to ask clarifying questions. Include relevant context - the node type, the message property, the protocol, or the error - in your initial query.
182+
183+
| Less effective | More effective |
184+
|---|---|
185+
| "How do I connect to a database?" | "How do I connect to a PostgreSQL database using the node-red-contrib-postgresql node?" |
186+
| "How do I format this?" | "How do I format a Unix timestamp as an ISO 8601 string in a Function node?" |
187+
188+
### Ask one question at a time for complex topics
189+
190+
If you have multiple questions, consider asking them separately so the Expert can give a focused answer to each rather than a broad response that covers everything superficially.
191+
192+
*See also: [Node-RED Embedded AI](/docs/user/expert/node-red-embedded-ai/) for AI features built directly into the Node-RED editor.*
193+
194+
<style>
195+
.assistant-feature {
196+
border: 1px solid #ddd;
197+
border-radius: 6px;
198+
padding: 18px;
199+
text-align: center;
200+
background: #f9f9f9;
201+
display: flex;
202+
align-items: center;
203+
justify-content: flex-start;
204+
gap: 12px;
205+
text-decoration: none;
206+
}
207+
.assistant-feature svg.icon-stroke path,
208+
.assistant-feature svg.icon-stroke line,
209+
.assistant-feature svg.icon-stroke circle,
210+
.assistant-feature svg.icon-stroke polyline,
211+
.assistant-feature svg.icon-stroke rect {
212+
stroke: #2563eb;
213+
fill: none;
214+
}
215+
.assistant-feature:hover {
216+
border-color: #2563eb;
217+
color: #2563eb;
218+
cursor: pointer;
219+
text-decoration: none;
220+
}
221+
.assistant-feature label {
222+
font-size: 1.15rem;
223+
pointer-events: none;
224+
}
225+
</style>

docs/user/expert/index.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
navTitle: FlowFuse Expert
3+
---
4+
5+
# FlowFuse Expert
6+
7+
FlowFuse Expert is the AI built into FlowFuse and the Node-RED editor. It is not a generic AI assistant bolted onto the side of your workflow, it understands your flows, your installed nodes, your live data, and your environment in real time.
8+
9+
**FlowFuse Expert is automatically installed and available in all hosted and remote instances running within or connected to FlowFuse**, no manual installation or configuration required.
10+
11+
## What FlowFuse Expert Can Do
12+
13+
FlowFuse Expert works in two distinct ways inside your environment.
14+
15+
### Chat Interface
16+
17+
The Chat Interface is a conversational AI panel built into the FlowFuse Platform and accessible directly within the Node-RED editor. You can ask questions, get help building and debugging flows, query live operational data via MCP, and explore your environment using context-aware tools.
18+
19+
The Chat Interface supports two modes - **Support** for flow-building assistance, and **Insights** for querying live data via MCP tools and resources.
20+
21+
[Learn more about the Chat Interface](/docs/user/expert/chat/)
22+
23+
### AI in Node-RED
24+
25+
FlowFuse Expert brings AI assistance directly into the Node-RED editor itself. It works where you already are - inside node editors, on the canvas, without requiring you to open a separate panel.
26+
27+
AI features within the Node-RED editor include inline code completions, flow autocomplete, function builder, flow explainer, JSON generation, and CSS and HTML generation for FlowFuse Dashboard.
28+
29+
> **Note:** FlowFuse Expert's in-editor AI features can also be installed as a plugin into Node-RED instances running outside of FlowFuse, using the `@flowfuse/nr-assistant` package from the Node-RED Palette Manager. This requires a FlowFuse Cloud account but does not require a paid subscription for the current release. The Chat Interface is exclusive to FlowFuse and cannot be installed externally.
30+
31+
[Learn more about AI in Node-RED](/docs/user/expert/node-red-embedded-ai/)
32+
33+
## Data Privacy
34+
35+
No data from FlowFuse is used by third-party AI service providers for training models.
36+
37+
Some features utilize the OpenAI API, and as such some data is sent to OpenAI to process requests. In accordance with the [OpenAI Terms of Service](https://help.openai.com/en/articles/5722486-how-your-data-is-used-to-improve-model-performance) no data is used for training of future models. OpenAI will retain data sent via its APIs for 30 days for abuse monitoring, after which it is permanently deleted.

0 commit comments

Comments
 (0)