@manny-est/node-red-flowpilot 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/PROJECT-OVERVIEW.md +98 -0
- package/README.md +144 -0
- package/USER-GUIDE.md +319 -0
- package/examples/dad-joke-demo.json +84 -0
- package/examples/getting-started.json +62 -0
- package/flowpilot.html +5673 -0
- package/flowpilot.js +1644 -0
- package/icons/flowpilot.svg +5 -0
- package/lib/default-system-prompt.js +76 -0
- package/lib/document-system-prompt.js +78 -0
- package/lib/generation-system-prompt.js +119 -0
- package/lib/modify-system-prompt.js +274 -0
- package/lib/provider-openai-compatible.js +377 -0
- package/lib/storage.js +265 -0
- package/package.json +49 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Manny
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# FlowPilot — Project Overview
|
|
2
|
+
|
|
3
|
+
FlowPilot is an AI-powered development assistant that lives in the Node-RED
|
|
4
|
+
editor sidebar. It talks to any OpenAI-compatible API (OpenAI, LocalAI,
|
|
5
|
+
Ollama, etc.) and helps you chat about, generate, modify, and document your
|
|
6
|
+
flows — always through Node-RED's own review and undo mechanisms, never
|
|
7
|
+
behind your back.
|
|
8
|
+
|
|
9
|
+
This document describes how FlowPilot was built and what it can do today.
|
|
10
|
+
For installation and provider setup, see [README.md](README.md).
|
|
11
|
+
|
|
12
|
+
## How it was built
|
|
13
|
+
|
|
14
|
+
FlowPilot grew through a sequence of phases, each adding one capability on
|
|
15
|
+
top of a stable foundation, with a working, reviewable build at every step:
|
|
16
|
+
|
|
17
|
+
- **Phase 1 — Foundation.** The sidebar plugin itself: an OpenAI-compatible
|
|
18
|
+
provider connection, a settings UI for provider profiles, and a basic
|
|
19
|
+
connectivity check.
|
|
20
|
+
- **Phase 2 — Context awareness.** FlowPilot reads the user's current node
|
|
21
|
+
selection and its wiring, sanitizes it (stripping editor-internal fields
|
|
22
|
+
and anything that looks like a credential), and sends that as context —
|
|
23
|
+
only when the user has something selected, and only on request.
|
|
24
|
+
- **Phase 3 — Read-only copilot.** Chat, plus one-click "intent" buttons
|
|
25
|
+
(Explain, Troubleshoot, Review, Suggest, and user-defined custom intents)
|
|
26
|
+
that pre-fill the prompt box with a ready-to-edit instruction.
|
|
27
|
+
- **Phase 4 — Generate.** FlowPilot can produce a brand-new flow fragment
|
|
28
|
+
from a plain-language description. The result is validated, laid out, and
|
|
29
|
+
handed to Node-RED's own import mechanism — the user places it with one
|
|
30
|
+
click and can undo it like any other paste.
|
|
31
|
+
- **Phase 5 — Modify.** FlowPilot can propose changes to the *selected*
|
|
32
|
+
nodes — property edits, rewiring, additions, and removals — shown as a
|
|
33
|
+
diff the user reviews and applies node-by-node, each as a native undo
|
|
34
|
+
step.
|
|
35
|
+
- **Phase 6 — Conversation, memory, and streaming.** Multi-turn conversation
|
|
36
|
+
history (capped and truncation-aware), per-conversation transcripts, a
|
|
37
|
+
"Flight log" of past conversations, Recall (keyword search across past
|
|
38
|
+
conversations), and SSE streaming for chat and generation responses.
|
|
39
|
+
- **Phase 6.5 — Polish.** Performance/audit metrics (timing, token usage),
|
|
40
|
+
UI refinements, and groundwork for the agentic phase.
|
|
41
|
+
- **Phase 7 — Agentic tool-calling.** For providers that support
|
|
42
|
+
tool/function calling, FlowPilot can autonomously call a small set of
|
|
43
|
+
read-only tools (inspect a node, list flows, search the flow, check
|
|
44
|
+
connections, read the Debug sidebar, get the current selection) to gather
|
|
45
|
+
information *before* answering or proposing a change — an
|
|
46
|
+
"explore-then-propose" loop, bounded by a step count and token ceiling,
|
|
47
|
+
with a visible cost summary and a Stop button.
|
|
48
|
+
|
|
49
|
+
Throughout, every phase preserved the same core guarantees: nothing is sent
|
|
50
|
+
without the user's selection or request, every proposed change is a
|
|
51
|
+
reviewable diff, and every applied change is a normal Node-RED undo step.
|
|
52
|
+
|
|
53
|
+
## Current feature set
|
|
54
|
+
|
|
55
|
+
- **Chat** — a conversational copilot with selection context, conversation
|
|
56
|
+
history, and optional live Debug-sidebar context attachment.
|
|
57
|
+
- **Query intents** — Explain, Troubleshoot, Review, Suggest, and
|
|
58
|
+
user-defined custom buttons that pre-fill a ready-to-edit prompt.
|
|
59
|
+
- **Generate** — describe a flow in plain language and get a new set of
|
|
60
|
+
nodes + wiring, reviewed and imported on your terms.
|
|
61
|
+
- **Modify** — select existing nodes, describe a change, and review a diff
|
|
62
|
+
before applying (property changes, rewiring, additions, removals).
|
|
63
|
+
- **Document** — auto-generate a "Read Me" comment node summarizing a
|
|
64
|
+
selection.
|
|
65
|
+
- **Recall & Flight log** — search and revisit past conversations; loading
|
|
66
|
+
one rehydrates the chat and its memory.
|
|
67
|
+
- **Debug context attachment** — attach recent Node-RED Debug sidebar output
|
|
68
|
+
to a request for troubleshooting.
|
|
69
|
+
- **Action chips** — when a chat reply describes a change the user could
|
|
70
|
+
make, FlowPilot offers a one-click switch to Generate/Modify/Document with
|
|
71
|
+
the request pre-filled.
|
|
72
|
+
- **Clarifying questions** — if an instruction is too vague to act on
|
|
73
|
+
safely, FlowPilot asks ONE question (optionally with quick-reply options)
|
|
74
|
+
instead of guessing.
|
|
75
|
+
- **Agentic exploration** — on providers with tool-calling support,
|
|
76
|
+
FlowPilot can inspect the flow itself before answering or proposing a
|
|
77
|
+
change.
|
|
78
|
+
- **Streaming replies** — SSE streaming for chat, generate, modify, and
|
|
79
|
+
document.
|
|
80
|
+
- **Models dropdown** — fetch the provider's available models instead of
|
|
81
|
+
typing a model name blind.
|
|
82
|
+
- **`/demo`** — a guided first request that walks through Generate end to
|
|
83
|
+
end.
|
|
84
|
+
|
|
85
|
+
## Architecture at a glance
|
|
86
|
+
|
|
87
|
+
- **`flowpilot.html`** — the editor-side plugin: sidebar UI, settings,
|
|
88
|
+
selection/context handling, and all the chat/generate/modify/document
|
|
89
|
+
client logic.
|
|
90
|
+
- **`flowpilot.js`** — the Node-RED runtime plugin: HTTP routes
|
|
91
|
+
(`/flowpilot/*`), provider calls, response parsing/validation, and audit
|
|
92
|
+
logging.
|
|
93
|
+
- **`lib/`** — system prompts (default/generation/document/modify), the
|
|
94
|
+
OpenAI-compatible provider adapter, and on-disk storage (settings,
|
|
95
|
+
transcripts, audit log).
|
|
96
|
+
- **Storage** — FlowPilot keeps its own settings, audit log, and
|
|
97
|
+
per-conversation transcripts under `<node-red-userDir>/flowpilot/`,
|
|
98
|
+
separate from the plugin code itself.
|
package/README.md
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# FlowPilot for Node-RED
|
|
2
|
+
|
|
3
|
+
Package: `@manny-est/node-red-flowpilot`
|
|
4
|
+
|
|
5
|
+
FlowPilot: AI assistance for Node-RED, designed for builders who want help
|
|
6
|
+
without giving up control.
|
|
7
|
+
|
|
8
|
+
FlowPilot is an AI-powered development assistant that lives in the Node-RED
|
|
9
|
+
editor sidebar. It talks to any OpenAI-compatible API (OpenAI, LocalAI,
|
|
10
|
+
Ollama, etc.) and helps you generate, modify, document, and discuss your
|
|
11
|
+
flows — without ever acting behind your back.
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
|
|
15
|
+
▶ [Watch a full walkthrough](https://github.com/manny-est/flowpilot/releases/download/v0.2.1/full-intro-demo.mp4) (MP4, ~30MB) — first launch, setting a provider, `/help`, and `/demo`.
|
|
16
|
+
|
|
17
|
+
See [PROJECT-OVERVIEW.md](PROJECT-OVERVIEW.md) for how FlowPilot was built
|
|
18
|
+
and a full rundown of its features, or [USER-GUIDE.md](USER-GUIDE.md) for
|
|
19
|
+
installation, the sidebar UI, and a chapter on every feature.
|
|
20
|
+
|
|
21
|
+
## Design principles
|
|
22
|
+
|
|
23
|
+
- **Reuse Node-RED** — built on native capabilities (undo, import, deploy,
|
|
24
|
+
selection, events) instead of parallel systems.
|
|
25
|
+
- **User-initiated only** — FlowPilot never changes your flow without an
|
|
26
|
+
explicit request.
|
|
27
|
+
- **Complete visibility** — every proposed change is shown as a diff/review
|
|
28
|
+
before anything is applied.
|
|
29
|
+
- **Undo first** — every change goes through Node-RED's native undo
|
|
30
|
+
(Ctrl+Z), including multi-part changes (insertions + rewires + new nodes)
|
|
31
|
+
as a single step.
|
|
32
|
+
- **Open architecture** — provider-agnostic, OpenAI-compatible REST. No
|
|
33
|
+
lock-in to one AI platform.
|
|
34
|
+
- **Simple and lightweight** — favors simple, maintainable solutions over
|
|
35
|
+
speculative complexity.
|
|
36
|
+
|
|
37
|
+
## Privacy & data
|
|
38
|
+
|
|
39
|
+
FlowPilot sends data to an AI provider only when **you** trigger a request —
|
|
40
|
+
nothing happens in the background. When you do, it sends the context you've
|
|
41
|
+
given it: your selected nodes and their wiring, any debug messages you've
|
|
42
|
+
attached, and your conversation history.
|
|
43
|
+
|
|
44
|
+
Before anything is sent, that context is sanitized: editor-internal fields are
|
|
45
|
+
stripped, and values that look like secrets (credentials, tokens, API keys,
|
|
46
|
+
auth headers) are redacted. Node-RED's separate credential store is never
|
|
47
|
+
included. A warning (⚠) appears in the status strip when a selection might
|
|
48
|
+
still contain sensitive configuration or code, so you can review before
|
|
49
|
+
sending.
|
|
50
|
+
|
|
51
|
+
Because your flow contents leave your Node-RED instance when you send a
|
|
52
|
+
request, a **local or private AI provider (LocalAI, Ollama, etc.) is
|
|
53
|
+
recommended for sensitive or proprietary flows**. You choose the provider, and
|
|
54
|
+
nothing is sent anywhere you didn't configure.
|
|
55
|
+
|
|
56
|
+
See the [User Guide](USER-GUIDE.md#privacy-and-safety) for the full details.
|
|
57
|
+
|
|
58
|
+
## Features
|
|
59
|
+
|
|
60
|
+
- **Chat** — a read-only copilot that can see your selected nodes and their
|
|
61
|
+
connections, with multi-turn conversation memory.
|
|
62
|
+
- **Generate** — describe a flow in plain language and get a new set of
|
|
63
|
+
nodes + wiring, reviewed and imported on your terms.
|
|
64
|
+
- **Modify** — select existing nodes, describe a change, and review a diff
|
|
65
|
+
before applying (property changes, rewiring, additions, removals).
|
|
66
|
+
- **Document** — auto-generate a "Read Me" comment node summarizing a
|
|
67
|
+
selection.
|
|
68
|
+
- **Review / Suggest / custom intents** — ask FlowPilot to critique or
|
|
69
|
+
suggest improvements to a selection.
|
|
70
|
+
- **Conversational memory** — FlowPilot remembers recent exchanges
|
|
71
|
+
(configurable depth) and carries that context into Generate/Modify/
|
|
72
|
+
Document, with a clear notice when older messages are truncated.
|
|
73
|
+
- **Clarifying questions** — if an instruction is too vague to act on
|
|
74
|
+
safely, FlowPilot asks ONE question instead of guessing.
|
|
75
|
+
- **Streaming replies** — optional SSE streaming for chat responses.
|
|
76
|
+
|
|
77
|
+
## Install in a local Node-RED user directory
|
|
78
|
+
|
|
79
|
+
From your Node-RED user directory:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
cd ~/.node-red
|
|
83
|
+
npm install /path/to/node-red-flowpilot
|
|
84
|
+
node-red
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
For a Docker/container setup, place or install the package inside the
|
|
88
|
+
mounted Node-RED user directory. If your user directory is
|
|
89
|
+
`/data` (or `/workspaces/nodered`, etc.), this folder should exist:
|
|
90
|
+
|
|
91
|
+
```text
|
|
92
|
+
<node-red-userDir>/node_modules/@manny-est/node-red-flowpilot
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Restart the Node-RED container/process after installing or updating —
|
|
96
|
+
plugin HTML is cached server-side, so a browser refresh alone is not enough.
|
|
97
|
+
|
|
98
|
+
FlowPilot stores its own settings and logs separately from the plugin code,
|
|
99
|
+
under `<node-red-userDir>/flowpilot/`:
|
|
100
|
+
|
|
101
|
+
- `settings.json` — provider configs (including API keys), custom intents,
|
|
102
|
+
conversation/streaming preferences
|
|
103
|
+
- `audit.log` — a log of every generate/modify/document action
|
|
104
|
+
- `chats/` — lightweight per-session chat logs
|
|
105
|
+
- `backups/` — pre-change backups
|
|
106
|
+
|
|
107
|
+
## Provider setup (example: LocalAI)
|
|
108
|
+
|
|
109
|
+
Open the FlowPilot sidebar, click the settings (gear) icon, and add a
|
|
110
|
+
provider:
|
|
111
|
+
|
|
112
|
+
- Provider name: `LocalAI` (or any label)
|
|
113
|
+
- Base URL: `http://localhost:8080`
|
|
114
|
+
- API key: blank unless your instance requires one
|
|
115
|
+
- Model: your model name
|
|
116
|
+
- Temperature: `0.2`
|
|
117
|
+
|
|
118
|
+
If Node-RED is running in Docker, `localhost` refers to the Node-RED
|
|
119
|
+
container, not the Docker host. Use the provider's container name, Docker
|
|
120
|
+
network alias, or host IP instead, e.g.:
|
|
121
|
+
|
|
122
|
+
```text
|
|
123
|
+
http://localai:8080
|
|
124
|
+
http://172.17.0.1:8080
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Click **Pre-flight check** to save and verify connectivity.
|
|
128
|
+
|
|
129
|
+
## Examples
|
|
130
|
+
|
|
131
|
+
The `examples/` folder includes a couple of small starter flows, available
|
|
132
|
+
from the editor's **Import → Examples → FlowPilot** menu — see
|
|
133
|
+
[USER-GUIDE.md](USER-GUIDE.md#examples) for what they're for.
|
|
134
|
+
|
|
135
|
+
## Development status
|
|
136
|
+
|
|
137
|
+
FlowPilot is under active development. Every change is reviewable and
|
|
138
|
+
undoable, but as with any AI-assisted tool, review proposed changes before
|
|
139
|
+
applying them — especially on flows you care about.
|
|
140
|
+
|
|
141
|
+
## Feedback
|
|
142
|
+
|
|
143
|
+
Found a bug or have a feature request? Please open an issue:
|
|
144
|
+
https://github.com/manny-est/flowpilot/issues
|
package/USER-GUIDE.md
ADDED
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
# FlowPilot — User Guide
|
|
2
|
+
|
|
3
|
+
This guide covers installing FlowPilot, the parts of its sidebar UI, setting
|
|
4
|
+
up an AI provider, and a walkthrough of every feature. For a high-level
|
|
5
|
+
overview of what FlowPilot is and how it was built, see
|
|
6
|
+
[PROJECT-OVERVIEW.md](PROJECT-OVERVIEW.md).
|
|
7
|
+
|
|
8
|
+
## Getting Started
|
|
9
|
+
|
|
10
|
+
▶ **[Watch a full walkthrough](https://github.com/manny-est/flowpilot/releases/download/v0.2.1/full-intro-demo.mp4)** (MP4, ~30MB) — first launch, setting a provider, `/help`, and `/demo` end to end.
|
|
11
|
+
|
|
12
|
+
### Install from the Palette
|
|
13
|
+
|
|
14
|
+
In the Node-RED editor, open the menu (top-right) → **Manage palette** →
|
|
15
|
+
**Install**, and search for `@manny-est/node-red-flowpilot`. Click **Install**.
|
|
16
|
+
|
|
17
|
+
### Install via npm
|
|
18
|
+
|
|
19
|
+
From your Node-RED user directory:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
cd ~/.node-red
|
|
23
|
+
npm install @manny-est/node-red-flowpilot
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
For a Docker/container setup, install into the mounted Node-RED user
|
|
27
|
+
directory (commonly `/data`), so the package ends up at:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
<node-red-userDir>/node_modules/@manny-est/node-red-flowpilot
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Restart Node-RED
|
|
34
|
+
|
|
35
|
+
Either way, **restart Node-RED** (or the container) after installing or
|
|
36
|
+
updating. FlowPilot's editor UI is cached server-side, so a browser refresh
|
|
37
|
+
alone is not enough.
|
|
38
|
+
|
|
39
|
+
### First launch
|
|
40
|
+
|
|
41
|
+

|
|
42
|
+
|
|
43
|
+
Open the FlowPilot sidebar tab (the paper-plane icon, usually grouped with
|
|
44
|
+
Info/Debug/etc. on the right edge of the editor) — or watch [a short clip of
|
|
45
|
+
finding it](https://github.com/manny-est/flowpilot/releases/download/v0.2.1/finding-flowpilot.mp4).
|
|
46
|
+
On first launch, FlowPilot
|
|
47
|
+
walks you through the basics in the chat panel and ends by pointing you at
|
|
48
|
+
**Settings** to add a provider — see [Set a Provider](#set-a-provider) below.
|
|
49
|
+
This walkthrough only appears once; it disappears for good after you save
|
|
50
|
+
settings (which happens automatically the first time you run a **Pre-flight
|
|
51
|
+
check**).
|
|
52
|
+
|
|
53
|
+

|
|
54
|
+
|
|
55
|
+
## UI Basics
|
|
56
|
+
|
|
57
|
+

|
|
58
|
+
|
|
59
|
+
The FlowPilot sidebar has three panels, switched using the icons in the
|
|
60
|
+
header row (top-right of the sidebar):
|
|
61
|
+
|
|
62
|
+
| Icon | Tooltip | What it does |
|
|
63
|
+
| --- | --- | --- |
|
|
64
|
+
| 🖉 eraser | Clear chat | Clears the chat and resets conversation memory |
|
|
65
|
+
| 🔍 magnifying glass | Recall | Searches past conversations for text in the prompt box |
|
|
66
|
+
| 🐛 bug | Debug log | View recent Debug sidebar output and attach it as context |
|
|
67
|
+
| ✈ paper-plane | Chat | Switch to the Chat panel |
|
|
68
|
+
| 🕐 clock | Flight log | Switch to the Flight log (past conversations) panel |
|
|
69
|
+
| ⚙ gear | Settings | Switch to the Settings panel |
|
|
70
|
+
|
|
71
|
+
### The Chat panel
|
|
72
|
+
|
|
73
|
+
This is FlowPilot's main view:
|
|
74
|
+
|
|
75
|
+
- **Messages area** — your conversation with FlowPilot, including any review
|
|
76
|
+
diffs, action chips, and clarifying questions.
|
|
77
|
+
- **Query buttons** (orange, left side, above the prompt box) — **Explain**,
|
|
78
|
+
**Troubleshoot**, **Review**, **Suggest**, plus any custom buttons you add.
|
|
79
|
+
Clicking one pre-fills the prompt box with a ready-to-edit instruction and
|
|
80
|
+
switches the prompt to an amber "Query" look.
|
|
81
|
+
- **Execute buttons** (blue, right side, above the prompt box) — **Document**,
|
|
82
|
+
**Generate**, **Modify**. Clicking one *arms* that mode (the prompt turns
|
|
83
|
+
blue) — describe what you want and hit Send.
|
|
84
|
+
- **Prompt box** — type your question or instruction here. Press **Enter** to
|
|
85
|
+
send, **Shift+Enter** for a new line. Drag the handle in the top-right
|
|
86
|
+
corner of the box to resize it.
|
|
87
|
+
- **Status strip** (below the prompt) — shows how many nodes are selected,
|
|
88
|
+
estimated context size, a credentials warning if relevant, any attached
|
|
89
|
+
debug messages, and the active provider. **Clear** empties the prompt box;
|
|
90
|
+
**Send** sends the request.
|
|
91
|
+
|
|
92
|
+
### The Settings panel
|
|
93
|
+
|
|
94
|
+
Configure AI providers, the system prompt, conversation memory, custom intent
|
|
95
|
+
buttons, and safety warnings. See [Set a Provider](#set-a-provider) and the
|
|
96
|
+
feature chapters below for details on each section.
|
|
97
|
+
|
|
98
|
+
### The Flight log panel
|
|
99
|
+
|
|
100
|
+
A list of past conversations. Click one to load it back into Chat — new
|
|
101
|
+
messages continue that conversation's memory. **Delete all** removes every
|
|
102
|
+
saved transcript permanently.
|
|
103
|
+
|
|
104
|
+
## Set a Provider
|
|
105
|
+
|
|
106
|
+
FlowPilot talks to any **OpenAI-compatible** API — OpenAI itself, LocalAI,
|
|
107
|
+
Ollama (with its OpenAI-compatible endpoint), LM Studio, etc.
|
|
108
|
+
|
|
109
|
+
1. Open **Settings** (gear icon).
|
|
110
|
+
2. Under **Providers**, click **+ Add** if you need a new provider slot
|
|
111
|
+
(one is created for you by default).
|
|
112
|
+
3. Fill in:
|
|
113
|
+
- **Provider Name** — any label, e.g. `LocalAI` or `OpenAI`.
|
|
114
|
+
- **Base URL** — e.g. `http://localhost:8080` or `https://api.openai.com`.
|
|
115
|
+
If Node-RED is running in Docker, `localhost` refers to the *Node-RED
|
|
116
|
+
container*, not the Docker host — use the provider's container name, a
|
|
117
|
+
Docker network alias, or a host IP (e.g. `http://172.17.0.1:8080`)
|
|
118
|
+
instead.
|
|
119
|
+
- **API Key** — leave blank unless your provider requires one.
|
|
120
|
+
- **Model** — type a model name, or click **Refresh models** to fetch the
|
|
121
|
+
provider's available models (via `GET /v1/models`) and pick from the
|
|
122
|
+
list.
|
|
123
|
+
- **Temperature** — a starting value of `0.2` works well for most uses.
|
|
124
|
+
|
|
125
|
+

|
|
126
|
+
|
|
127
|
+
4. Click **Pre-flight check**. This saves your settings and sends a small
|
|
128
|
+
test request. A reply in the chat panel means you're connected.
|
|
129
|
+
|
|
130
|
+

|
|
131
|
+
|
|
132
|
+
You can configure multiple providers and switch between them with the
|
|
133
|
+
**Active provider** dropdown — useful for comparing models, or keeping a
|
|
134
|
+
cheap/fast provider and a more capable one side by side. **Remove** deletes
|
|
135
|
+
the currently selected provider.
|
|
136
|
+
|
|
137
|
+
## Features
|
|
138
|
+
|
|
139
|
+
### Chat
|
|
140
|
+
|
|
141
|
+
Ask FlowPilot anything in plain language. If you have nodes selected on the
|
|
142
|
+
canvas, FlowPilot sees their configuration and wiring (sanitized — see
|
|
143
|
+
[Privacy and safety](#privacy-and-safety) below) and can reason about them.
|
|
144
|
+
Chat remembers recent exchanges (configurable under **Behavior → Remember
|
|
145
|
+
last N exchanges**) so you can have a back-and-forth conversation.
|
|
146
|
+
|
|
147
|
+
### Query intents: Explain, Troubleshoot, Review, Suggest
|
|
148
|
+
|
|
149
|
+
One-click buttons that pre-fill the prompt box with a ready-to-edit
|
|
150
|
+
instruction about your current selection:
|
|
151
|
+
|
|
152
|
+
- **Explain** — walks through what the selection does, step by step.
|
|
153
|
+
- **Troubleshoot** — looks for disabled nodes, dead-end wires, and likely
|
|
154
|
+
misconfigurations.
|
|
155
|
+
- **Review** — a design/architecture critique with concrete suggestions.
|
|
156
|
+
- **Suggest** — suggests improvements or other Node-RED nodes that could help.
|
|
157
|
+
|
|
158
|
+
You can add your own custom intent buttons under **Settings → Behavior →
|
|
159
|
+
Custom intent buttons** — give it a label and the instruction text it should
|
|
160
|
+
send.
|
|
161
|
+
|
|
162
|
+

|
|
163
|
+
|
|
164
|
+
### Generate
|
|
165
|
+
|
|
166
|
+
Describe a new flow in plain language (e.g. "fetch the weather every hour and
|
|
167
|
+
log it to a file") and click **Generate**, then **Send**. FlowPilot returns a
|
|
168
|
+
flow fragment, which you review before doing anything with it — nothing is
|
|
169
|
+
added to your canvas automatically. Approve it and FlowPilot hands the nodes
|
|
170
|
+
to Node-RED's own import, so placement and undo (Ctrl+Z) work exactly like a
|
|
171
|
+
normal paste.
|
|
172
|
+
|
|
173
|
+
Try `/demo` in the prompt box for a ready-made example: it types a Generate
|
|
174
|
+
request for a small "fetch a dad joke" flow into the box for you.
|
|
175
|
+
|
|
176
|
+

|
|
177
|
+
|
|
178
|
+

|
|
179
|
+
|
|
180
|
+

|
|
181
|
+
|
|
182
|
+
### Modify
|
|
183
|
+
|
|
184
|
+
Select the node(s) you want to change, arm **Modify**, and describe the
|
|
185
|
+
change (e.g. "add a 5 second delay before this", "change this function to
|
|
186
|
+
also log errors"). FlowPilot proposes property changes, rewiring, additions,
|
|
187
|
+
and removals as a diff. You review and apply each change — every applied
|
|
188
|
+
change is a single native Node-RED undo step (Ctrl+Z).
|
|
189
|
+
|
|
190
|
+

|
|
191
|
+
|
|
192
|
+

|
|
193
|
+
|
|
194
|
+
### Document
|
|
195
|
+
|
|
196
|
+
Select node(s), arm **Document**, and (optionally) add notes about what you
|
|
197
|
+
want highlighted, then **Send**. FlowPilot generates a "Read Me" comment node
|
|
198
|
+
summarizing the selection, which you review and place like any other change.
|
|
199
|
+
|
|
200
|
+

|
|
201
|
+
|
|
202
|
+

|
|
203
|
+
|
|
204
|
+
### Recall & Flight log
|
|
205
|
+
|
|
206
|
+
- **Recall** (magnifying glass icon) — type a search term in the prompt box
|
|
207
|
+
and click Recall to search across your past conversations. Each result has
|
|
208
|
+
a **Use this** button to load that conversation back into Chat.
|
|
209
|
+
- **Flight log** (clock icon) — browse and reload past conversations
|
|
210
|
+
directly, or delete saved transcripts.
|
|
211
|
+
|
|
212
|
+

|
|
213
|
+
|
|
214
|
+
### Debug context attachment
|
|
215
|
+
|
|
216
|
+
Click the **bug icon** to view recent messages from Node-RED's Debug sidebar.
|
|
217
|
+
Click **Attach** on any entry to include it as context for your next request
|
|
218
|
+
— useful for troubleshooting ("here's the error my flow just printed, what's
|
|
219
|
+
wrong?"). The status strip shows how many debug messages are attached; clear
|
|
220
|
+
them from there or by clicking **Clear chat**.
|
|
221
|
+
|
|
222
|
+

|
|
223
|
+
|
|
224
|
+

|
|
225
|
+
|
|
226
|
+
### Action chips
|
|
227
|
+
|
|
228
|
+
When FlowPilot's reply describes a change you could make, it may offer an
|
|
229
|
+
action chip — a one-click button that switches to the suggested mode
|
|
230
|
+
(Generate/Modify/Document/Chat) with the request pre-filled. Nothing is sent
|
|
231
|
+
until you review and hit Send yourself.
|
|
232
|
+
|
|
233
|
+

|
|
234
|
+
|
|
235
|
+

|
|
236
|
+
|
|
237
|
+
### Clarifying questions
|
|
238
|
+
|
|
239
|
+
If your instruction is too vague to act on safely, FlowPilot asks **one**
|
|
240
|
+
clarifying question instead of guessing — often with quick-reply buttons (plus
|
|
241
|
+
an "Other" option for free text). Picking an answer sends it immediately.
|
|
242
|
+
|
|
243
|
+

|
|
244
|
+
|
|
245
|
+
### Agentic exploration
|
|
246
|
+
|
|
247
|
+
If your provider supports tool/function calling, FlowPilot can autonomously
|
|
248
|
+
inspect your flow before answering or proposing a change — looking at a
|
|
249
|
+
node's config, listing flows, searching for nodes, checking connections, or
|
|
250
|
+
reading the Debug sidebar. This is read-only, bounded by a step count and
|
|
251
|
+
token budget, shown to you as it happens, and can be interrupted with the
|
|
252
|
+
**Stop** button.
|
|
253
|
+
|
|
254
|
+

|
|
255
|
+
|
|
256
|
+
### Streaming replies
|
|
257
|
+
|
|
258
|
+
Chat (and Generate/Modify/Document) responses can stream in as they're
|
|
259
|
+
generated rather than appearing all at once. Toggle this under **Settings →
|
|
260
|
+
Behavior → Stream chat replies**.
|
|
261
|
+
|
|
262
|
+

|
|
263
|
+
|
|
264
|
+
### Slash commands
|
|
265
|
+
|
|
266
|
+
Type these directly into the prompt box:
|
|
267
|
+
|
|
268
|
+
- `/help` — show the full command/feature briefing
|
|
269
|
+
- `/generate`, `/document`, `/modify` — arm that Execute mode
|
|
270
|
+
- `/query` (or `/chat`) — back to Query mode
|
|
271
|
+
- `/clear` — start a fresh conversation (clears chat and memory)
|
|
272
|
+
- `/history` — open the Flight log
|
|
273
|
+
- `/settings` — open Settings
|
|
274
|
+
- `/demo` — load a sample Generate request into the prompt box
|
|
275
|
+
|
|
276
|
+

|
|
277
|
+
|
|
278
|
+

|
|
279
|
+
|
|
280
|
+

|
|
281
|
+
|
|
282
|
+
### Privacy and safety
|
|
283
|
+
|
|
284
|
+
- FlowPilot only sends data when **you** trigger a request — nothing happens
|
|
285
|
+
in the background.
|
|
286
|
+
- Selected nodes are sanitized before sending: editor-internal fields are
|
|
287
|
+
stripped, and config-node credential fields are dropped entirely.
|
|
288
|
+
- A warning icon (⚠) appears in the status strip if your selection might
|
|
289
|
+
still contain sensitive configuration or code — review before sending,
|
|
290
|
+
especially with cloud providers. A local/private AI provider (LocalAI,
|
|
291
|
+
Ollama, etc.) is recommended for sensitive flows.
|
|
292
|
+
- Every Generate/Modify/Document result is shown as a review or diff —
|
|
293
|
+
nothing is applied until you click Apply/import, and every applied change
|
|
294
|
+
is a normal Node-RED undo step.
|
|
295
|
+
|
|
296
|
+

|
|
297
|
+
|
|
298
|
+
## Examples
|
|
299
|
+
|
|
300
|
+
The `examples/` folder (visible via the editor's **Import → Examples →
|
|
301
|
+
FlowPilot** menu) includes:
|
|
302
|
+
|
|
303
|
+
- **Getting Started** — a tiny inject → function → debug flow to practice
|
|
304
|
+
Explain/Modify on.
|
|
305
|
+
- **Dad Joke Demo** — a working version of the flow that `/demo` generates,
|
|
306
|
+
so you can see the end result before trying Generate yourself.
|
|
307
|
+
|
|
308
|
+
## Bug Reports & Feature Requests
|
|
309
|
+
|
|
310
|
+
Found a bug, or have an idea for a feature? Please open an issue on GitHub:
|
|
311
|
+
|
|
312
|
+
**https://github.com/manny-est/flowpilot/issues**
|
|
313
|
+
|
|
314
|
+
When reporting a bug, it helps to include:
|
|
315
|
+
|
|
316
|
+
- Your Node-RED version and FlowPilot version (`package.json` → `version`).
|
|
317
|
+
- The AI provider/model you're using (not your API key).
|
|
318
|
+
- Steps to reproduce, and what you expected vs. what happened.
|
|
319
|
+
- Anything relevant from the browser console or Node-RED's log.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "fp-ex2-tab",
|
|
4
|
+
"type": "tab",
|
|
5
|
+
"label": "FlowPilot: Dad Joke Demo",
|
|
6
|
+
"disabled": false,
|
|
7
|
+
"info": "This is the kind of flow FlowPilot's `/demo` slash command generates from scratch via Generate.\n\nDeploy this flow, then click the inject node to fetch a random dad joke — the node's status will show the joke text, and it'll print in the debug sidebar too.\n\nTry selecting these nodes in FlowPilot and clicking **Explain**, or arm **Modify** and ask it to write the joke to a file instead of the debug sidebar.",
|
|
8
|
+
"env": []
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"id": "fp-ex2-inject",
|
|
12
|
+
"type": "inject",
|
|
13
|
+
"z": "fp-ex2-tab",
|
|
14
|
+
"name": "get a dad joke",
|
|
15
|
+
"props": [
|
|
16
|
+
{ "p": "payload" }
|
|
17
|
+
],
|
|
18
|
+
"repeat": "",
|
|
19
|
+
"crontab": "",
|
|
20
|
+
"once": false,
|
|
21
|
+
"onceDelay": 0.1,
|
|
22
|
+
"topic": "",
|
|
23
|
+
"payload": "",
|
|
24
|
+
"payloadType": "date",
|
|
25
|
+
"x": 150,
|
|
26
|
+
"y": 140,
|
|
27
|
+
"wires": [["fp-ex2-http"]]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "fp-ex2-http",
|
|
31
|
+
"type": "http request",
|
|
32
|
+
"z": "fp-ex2-tab",
|
|
33
|
+
"name": "icanhazdadjoke",
|
|
34
|
+
"method": "GET",
|
|
35
|
+
"ret": "obj",
|
|
36
|
+
"paytoqs": "ignore",
|
|
37
|
+
"url": "https://icanhazdadjoke.com/",
|
|
38
|
+
"tls": "",
|
|
39
|
+
"persist": false,
|
|
40
|
+
"proxy": "",
|
|
41
|
+
"insecureHTTPParser": false,
|
|
42
|
+
"authType": "",
|
|
43
|
+
"senderr": false,
|
|
44
|
+
"headers": [
|
|
45
|
+
{ "keyType": "other", "keyValue": "Accept", "valueType": "other", "valueValue": "application/json" }
|
|
46
|
+
],
|
|
47
|
+
"x": 350,
|
|
48
|
+
"y": 140,
|
|
49
|
+
"wires": [["fp-ex2-function"]]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": "fp-ex2-function",
|
|
53
|
+
"type": "function",
|
|
54
|
+
"z": "fp-ex2-tab",
|
|
55
|
+
"name": "show joke status",
|
|
56
|
+
"func": "var joke = (msg.payload && msg.payload.joke) || \"(no joke returned)\";\nnode.status({ fill: \"green\", shape: \"dot\", text: joke });\nmsg.payload = joke;\nreturn msg;",
|
|
57
|
+
"outputs": 1,
|
|
58
|
+
"timeout": 0,
|
|
59
|
+
"noerr": 0,
|
|
60
|
+
"initialize": "",
|
|
61
|
+
"finalize": "",
|
|
62
|
+
"libs": [],
|
|
63
|
+
"x": 580,
|
|
64
|
+
"y": 140,
|
|
65
|
+
"wires": [["fp-ex2-debug"]]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"id": "fp-ex2-debug",
|
|
69
|
+
"type": "debug",
|
|
70
|
+
"z": "fp-ex2-tab",
|
|
71
|
+
"name": "joke",
|
|
72
|
+
"active": true,
|
|
73
|
+
"tosidebar": true,
|
|
74
|
+
"console": false,
|
|
75
|
+
"tostatus": false,
|
|
76
|
+
"complete": "payload",
|
|
77
|
+
"targetType": "msg",
|
|
78
|
+
"statusVal": "",
|
|
79
|
+
"statusType": "auto",
|
|
80
|
+
"x": 780,
|
|
81
|
+
"y": 140,
|
|
82
|
+
"wires": []
|
|
83
|
+
}
|
|
84
|
+
]
|