FlowFuse Assistant Plugin

Introduced in FlowFuse 2.6 on FlowFuse Cloud only. This feature is not yet available for self-hosted customers.

The FlowFuse Assistant brings the power of AI to the Node-RED editor and FlowFuse. Hosted Instances running within FlowFuse Cloud will include the FlowFuse Assistant, a plugin that helps you work faster and smarter.

Assistant Features Overview

The Assistant 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 eisting 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 Assistant and any new features, ensure your Instance is running the latest Stack and the Assistant is updated to the latest version.

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 Assistant 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 Assistant 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 Assistant 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 Assistant 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

assistant dialog Screenshot showing the assistant 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 assistant will know to set the number of outputs on the function node setup.

Function Code Generation

Ask FlowFuse Assistant

The FlowFuse Assistant 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 Assistant 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 Assistant 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.

He 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 Assistant prompt

CSS and HTML Generation for FlowFuse Dashboard

The FlowFuse Assistant 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.

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.