Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions docs/user/mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,16 @@ Flow work runs in a live editor session, not as a file to import. Point the agen
| Config nodes | List config nodes | Create and update config nodes | Delete config nodes |
| Import | None | Import a flow onto the canvas | None |
| Palette | Read the installed palette, list node types, describe node type properties | Install FlowFuse and certified nodes directly, open the palette manager to install any other package, see [Node installs](#node-installs) | None |
| Canvas | Read the full flow, read debug output, search and select nodes, navigate to a tab or subflow | Align and distribute nodes, set the deploy mode | Deploy changes, see [Agent deploy](#agent-deploy) |
| Canvas | Read the full flow, read debug output, search and select nodes, navigate to a tab or subflow | Align and distribute nodes, set the deploy mode | Deploy changes, inject test messages into deployed nodes, see [Agent deploy and inject](#agent-deploy-and-inject) |
| FlowFuse Tables | Query table data | Build a [Query Node](/docs/user/ff-tables/#query-nodes) flow that reads and writes tables | None |

By default nothing goes live until you deploy from Node-RED. A team owner can let agents deploy their own changes, see [Agent deploy](#agent-deploy).
By default nothing goes live until you deploy from Node-RED. A team owner can let agents deploy their own changes and test them, see [Agent deploy and inject](#agent-deploy-and-inject).

## Agent deploy
## Agent deploy and inject

A team owner turns this on from **Team Settings > Danger > AI Flow Deploy**. It is off by default and needs AI Features enabled for the team.
A team owner turns this on from **Team Settings > Danger > AI Flow Deploy and Inject**. It is off by default and needs AI Features enabled for the team.

With it on, an agent can deploy its changes and inject test messages into deployed nodes, then read the results from the debug sidebar. An injected message runs the real flow, so downstream nodes act on it as usual. Each inject is recorded in the instance audit log.

Available from FlowFuse 3.1 with `@flowfuse/nr-assistant` 0.20.0 or later.

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/data/audit-events.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"team.user.invite.rejected": "User Invite Rejected",
"team.user.role-changed": "User Role Modified",
"team.settings.updated": "Team Settings Updated",
"team.agent-auto-deploy.enabled": "AI Flow Deploy Enabled",
"team.agent-auto-deploy.disabled": "AI Flow Deploy Disabled",
"team.agent-auto-deploy.enabled": "AI Flow Deploy and Inject Enabled",
"team.agent-auto-deploy.disabled": "AI Flow Deploy and Inject Disabled",
"team.type.changed": "Team Type Changed",
"team.device.created": "New Device Created",
"team.device.deleted": "Device Deleted",
Expand Down
14 changes: 7 additions & 7 deletions frontend/src/pages/team/Settings/Danger.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@
<ff-toggle-switch v-model="aiEnabled" data-el="team-ai-toggle" @change="showConfirmAiToggleDialog" />
</div>
</div>
<FormHeading>AI Flow Deploy</FormHeading>
<FormHeading>AI Flow Deploy and Inject</FormHeading>
<div class="flex flex-col space-y-4 max-w-2xl lg:flex-row lg:items-center lg:space-y-0">
<div class="grow">
<div class="max-w-sm pr-2">Allow AI agents to deploy flow changes they make on this team's instances, without waiting for a person to click Deploy.</div>
<div class="max-w-sm pr-2">Allow AI agents to deploy flow changes they make on this team's instances without waiting for a person to click Deploy, and to inject test messages into deployed flows to check their work. Injected messages run the real flow, so downstream nodes act on them as usual.</div>
<div v-if="!aiEnabled" class="max-w-sm pr-2 text-gray-400 italic">Enable AI Features above to use this.</div>
</div>
<div class="min-w-fit shrink-0">
Expand Down Expand Up @@ -226,19 +226,19 @@ export default {
showConfirmAgentAutoDeployToggleDialog () {
const enabling = this.agentAutoDeploy
Dialog.show({
header: enabling ? 'Enable AI Flow Deploy' : 'Disable AI Flow Deploy',
header: enabling ? 'Enable AI Flow Deploy and Inject' : 'Disable AI Flow Deploy and Inject',
kind: enabling ? 'danger' : 'primary',
text: enabling
? 'Are you sure you want to allow AI agents to deploy flows on this team\'s instances?'
: 'Are you sure you want to disable AI agents deploying flow changes automatically?',
? 'Are you sure you want to allow AI agents to deploy flows and inject messages into running flows on this team\'s instances?'
: 'Are you sure you want to stop AI agents from deploying flow changes and injecting messages?',
confirmLabel: enabling ? 'Enable' : 'Disable'
}, () => {
teamApi.updateTeam(this.team.id, { features: { agentAutoDeploy: enabling } }).then(() => {
alerts.emit(`AI Flow Deploy ${enabling ? 'enabled' : 'disabled'}`, 'confirmation')
alerts.emit(`AI Flow Deploy and Inject ${enabling ? 'enabled' : 'disabled'}`, 'confirmation')
this.agentAutoDeployOverride = null
useContextStore().refreshTeam()
}).catch(err => {
alerts.emit('Problem updating AI Flow Deploy settings', 'warning')
alerts.emit('Problem updating AI Flow Deploy and Inject settings', 'warning')
this.agentAutoDeployOverride = null
console.warn(err)
})
Expand Down
Loading