FlowFuse Expert

The FlowFuse Expert brings the power of AI to the Node-RED editor and FlowFuse. FlowFuse Expert is automatically installed and available in all hosted instances running within FlowFuse Cloud - no manual installation or configuration required.

You can also install the FlowFuse Expert plugin into your own Node-RED instances outside of FlowFuse. This requires a FlowFuse Cloud account, but for the current release, it does not require a paid subscription to use.

FlowFuse Expert Features Overview

The FlowFuse Expert currently supports the following features:

  1. Flow Autocomplete: Automated, intelligent suggestions for which node should be added next in your flow
  2. Inline Code Completions: Inline code completions for Function node, Tables Query node and FlowFuse Dashboard ui-template node
  3. Flow Explainer: Get detailed explanations of the selected nodes in your flow
  4. Function Node Creation: Create a new function node directly, driven by natural language.
  5. Function Code Generation: Within the scope of an existing function node, ask the assistant to write code for you.
  6. JSON Generation: In-editor JSON generation within the JSON editor for all typed inputs and JSON editors.
  7. CSS and HTML Generation: In-editor CSS and HTML generation for FlowFuse Dashboard ui-template nodes

To enable the latest FlowFuse Expert features, ensure your Instance is running the latest Stack. For FlowFuse Cloud instances, FlowFuse Expert (@flowfuse/nr-assistant) is automatically updated to the latest version.

FlowFuse Expert for self-hosted customers

If you are self-hosting FlowFuse with an Enterprise license, get in touch with support who'll be able to help get you setup to use FlowFuse Expert locally.

Flow Autocomplete

Recording of the flow autocomplete in-action, with up/down keys used to toggle suggestions and tab to move to the next suggestion Recording of the flow autocomplete in-action, with up/down keys used to toggle suggestions and tab to move to the next suggestion

The FlowFuse Expert runs our trained, in-browser, machine learning model that will provide intelligent suggestions for which node should be added next in your flow.

You can accept the suggestion by clicking the suggestion or by pressing the Tab key. You can also toggle through the suggestions by pressing the Up and Down keys.

Inline Code Completions

Mimicking the ever-familiar co-pilot assistant in your IDE, the FlowFuse Expert plugin provides inline code completions for Function nodes, Tables Query nodes, and FlowFuse Dashboard ui-template nodes.

inline code completions A simple example of inline code completions for a Function node

This feature accelerates the writing of custom code and queries by providing intelligent suggestions without having to leave the editor. Coding with the FlowFuse Expert is a breeze, and lowers the barrier to entry for non-technical users.

Using comments is optional here, the assistant will do it's best to understand the context of the code and provide suggestions based on the surrounding code, however, if you do write comments, we've found that it really helps to frame the request in a way that is more likely to be understood by the assistant.

Flow Explainer

The FlowFuse Expert plugin also adds a new button to the Assistant menu that will explain what the selected nodes do. To use this feature, simply select the 1 or more nodes that you want to understand and click the "Explain Flows" button in the Assistant menu.

Function Node Creation

FlowFuse Expert dialog Screenshot showing the FlowFuse Expert dialog for creating a function node

Use natural language to request a new function node be added to the Node-RED flow.

This is useful when you want to quickly add a function node to your flow without having to drag it from the palette and write the code yourself.

If your Instance supports external modules, you can also ask for a function node that uses this and it will be added to the function node setup.

If your function node requires multiple outputs, the FlowFuse Expert will know to set the number of outputs on the function node setup.

Function Code Generation

Ask FlowFuse Expert

The FlowFuse Expert plugin also adds a new code lens to the function node editor that allows you to generate code directly within the editor.

inline code lens

This is useful when you want to quickly add code to an existing function node without having to generate a full function node from scratch.

JSON Generation

The FlowFuse Expert plugin also adds a code lens to the JSON editor that allows you to generate JSON directly within the monaco editor.

json generation Screenshot showing a FlowFuse Expert prompt for JSON generation

This is useful when you want to quickly generate JSON for a prototype, or test a piece of functionality in your flows.

Here we can see the result of the above prompt, requesting simulated data for progress on lines in a manufacturing plant:

json generation Screenshot showing the result of the above FlowFuse Expert prompt

CSS and HTML Generation for FlowFuse Dashboard

The FlowFuse Expert plugin also adds a code lens to the FlowFuse Dashboard ui-template node that allows you to generate CSS and HTML directly within the code editor. It is aware of the context of the node and will generate suitable CSS and HTML components for Vuetify and the FlowFuse Dashboard.

Installing FlowFuse Expert in External Node-RED Instances

Note: FlowFuse Cloud instances have FlowFuse Expert automatically installed. Manual installation is only needed for Node-RED instances running outside of FlowFuse.

To install the plugin in your own Node-RED instance:

  1. Use the Node-RED Palette Manager to install the package @flowfuse/nr-assistant
  2. Restart Node-RED
  3. Click the FlowFuse Expert icon in the header
  4. Follow the prompts to connect to your FlowFuse Cloud account
  5. Once connected, you will be able to use all FlowFuse Expert features

Data Privacy

No data from FlowFuse is used by third-party AI service providers for training models.

OpenAI API

Some of the above features do utilize the OpenAI API, and as such, some data is sent to OpenAI to process the requests. In accordance with the OpenAI Terms of Service no data is used for training of future models.

OpenAI will retain data sent via it's APIs for 30 days for abuse monitoring, it is then permanently deleted.