feat: add Support for Agent Deploy - #8556
Merged
Merged
Conversation
…ed a pre-existing issue where team object has no .type) Regresion tests added to cover this
11 tasks
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8556 +/- ##
==========================================
+ Coverage 77.02% 77.06% +0.04%
==========================================
Files 465 465
Lines 24923 24932 +9
Branches 6636 6641 +5
==========================================
+ Hits 19197 19215 +18
+ Misses 5726 5717 -9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
Some findings from testing this locally:
|
Contributor
Author
Please re-check |
Contributor
|
Re-checked all three points, all good: explicit team-level opt-in with the enableAllFeatures regression test, rate limit matching the sibling endpoints, consistent naming. Two follow-ups on our side:
|
andypalmi
reviewed
Sep 18, 2026
| */ | ||
| app.get('/deploy-policy', { | ||
| schema: { | ||
| hide: true // dont show in swagger |
Contributor
There was a problem hiding this comment.
Ok for now, we can come back on it later if somebody wants to query that
Co-authored-by: Andrea Palmieri <76187074+andypalmi@users.noreply.github.com>
andypalmi
approved these changes
Sep 18, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a team-level "Agent Initiated Deploy" setting. When on, an AI agent (first-party Expert or a third-party MCP client) can deploy the flow changes it makes on that team's instances, instead of leaving them staged for a person to click Deploy. Off by default, and gated on the same platform/team
aifeature flags as the existing AI opt-out toggle.Changes
forge/routes/api/team.js: addagentAutoDeployto thefeaturesallowlist onPUT /api/v1/teams/:teamId.forge/routes/api/assistant.js: new EndpointGET /api/v1/assistant/deploy-policy, a live check combining the platformaiflag with the team'sagentAutoDeployoverride. Checked live rather than cached, so turning it off takes effect immediately, no instance restart needed.frontend/src/pages/team/Settings/Danger.vue: new "AI Flow Deploy" toggle next to AI Features, disabled (with an explanatory hint) when AI Features is off, since the setting has no effect otherwise.frontend/src/stores/context.js: exposeagentAutoDeployEnabledon the agent's context object, so an agent can check the setting up front instead of learning it's off from a failed deploy attempt.frontend/src/composables/TeamProperties.js:getTeamPropertynow tolerates a team with no.typeinstead of throwing.Testing
team_spec.js: owner can toggleagentAutoDeploy, member gets 403, feature keys outside the allowlist are ignored.assistant_spec.js:/deploy-policycovers default-off, team-enabled, team-opted-out-of-ai, and platform-ai-disabled.context.spec.js:agentAutoDeployEnabledcovers no-team, platform/team ai-off, override-enabled, and TeamType-fallback, plus both branches of theexpertgetter.TeamProperties.spec.js: new file. No coverage existed for this composable before.Notes
The
deploy_flowstool itself, and the automation that actually triggers the deploy, live innr-assistantand a separate Flow Builder MCP tool surface to be shipped alongside this. This PR is theflowfusehalf: the setting, its API, and the policy check the agent reads from.It should not be merged until nr-assistant and agent work is merged (FlowFuse/nr-assistant#405 and https://github.com/FlowFuse/engineering/issues/370 and https://github.com/FlowFuse/engineering/issues/371)
Related Issue(s)
closes #8555
Checklist
flowforge.yml?FlowFuse/helmto update ConfigMap TemplateFlowFuse/CloudProjectto update values for Staging/ProductionLabels
area:migrationlabel