Skip to content

feat(ui): add agent management under Providers feature flag#1625

Merged
PetrBulanek merged 4 commits intomainfrom
ui/manage-agents-under-flag
Dec 11, 2025
Merged

feat(ui): add agent management under Providers feature flag#1625
PetrBulanek merged 4 commits intomainfrom
ui/manage-agents-under-flag

Conversation

@PetrBulanek
Copy link
Contributor

@PetrBulanek PetrBulanek commented Nov 21, 2025

Summary

Removes the “Add Agent” button from the GUI for all roles to reduce confusion and keep the interface focused on end-user actions, with the CLI remaining the primary method for managing agents. Agent management is actually not removed from the UI entirely - it is now hidden behind the Providers feature flag.

Linked Issues

Closes: #1563

Documentation

  • No Docs Needed:

@PetrBulanek PetrBulanek requested review from kapetr and tomkis November 21, 2025 12:11
Signed-off-by: Petr Bulánek <bulanek.petr@gmail.com>
@PetrBulanek PetrBulanek force-pushed the ui/manage-agents-under-flag branch from 8911a69 to f4fe3a7 Compare December 4, 2025 16:00
@PetrBulanek PetrBulanek changed the title [DRAFT] feat(ui): add agent management under Providers feature flag feat(ui): add agent management under Providers feature flag Dec 4, 2025
@PetrBulanek PetrBulanek marked this pull request as ready for review December 4, 2025 16:03
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Dec 4, 2025
@PetrBulanek
Copy link
Contributor Author

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request successfully moves the agent management functionality behind the Providers feature flag. The changes in the React components correctly apply this logic to hide UI elements like the 'Add Agent' button and the 'Agent providers' settings tab based on the feature flag and user role. The documentation and example environment file have also been updated accordingly.

I have a couple of suggestions regarding the ordering of feature flags in the documentation and example configuration file to improve consistency across the codebase. Overall, the changes are well-implemented and align with the goal of making agent management a configurable feature.


# All feature flags default to false
FEATURE_FLAGS='{"LocalSetup":true,"MCP":true,"Providers":true,"ProviderBuilds":true,"Variables":true,"Connectors":false}'
FEATURE_FLAGS='{"Connectors":false,"LocalSetup":false,"MCP":false,"Providers":false,"ProviderBuilds":false,"Variables":false}'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The order of feature flags in the JSON string is not alphabetical, with Providers appearing before ProviderBuilds. This is inconsistent with their definition in apps/agentstack-ui/src/utils/feature-flags.ts. For better consistency and maintainability, please sort the keys alphabetically.

FEATURE_FLAGS='{"Connectors":false,"LocalSetup":false,"MCP":false,"ProviderBuilds":false,"Providers":false,"Variables":false}'

Comment on lines +22 to +24
- **Providers** – Shows the “Agent providers” tab in Settings and allows admin/developer users to manage agents, including adding agents using container image URLs and removing agents.
- **ProviderBuilds** – Adds the option to import agents directly from a GitHub repository. *Requires `Providers` to also be enabled.*
- **Connectors** – Shows the “Connectors” tab in Settings and lets you list, connect, disconnect, and remove registered connectors.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The feature flags in this list are not sorted alphabetically, which is inconsistent with their definition in apps/agentstack-ui/src/utils/feature-flags.ts. To improve consistency and maintainability, please reorder this part of the list alphabetically.

Suggested change
- **Providers** – Shows the “Agent providers” tab in Settings and allows admin/developer users to manage agents, including adding agents using container image URLs and removing agents.
- **ProviderBuilds** – Adds the option to import agents directly from a GitHub repository. *Requires `Providers` to also be enabled.*
- **Connectors** – Shows the “Connectors” tab in Settings and lets you list, connect, disconnect, and remove registered connectors.
- **Connectors** – Shows the “Connectors” tab in Settings and lets you list, connect, disconnect, and remove registered connectors.
- **ProviderBuilds** – Adds the option to import agents directly from a GitHub repository. *Requires `Providers` to also be enabled.*
- **Providers** – Shows the “Agent providers” tab in Settings and allows admin/developer users to manage agents, including adding agents using container image URLs and removing agents.

Signed-off-by: Petr Bulánek <bulanek.petr@gmail.com>
const action = useMemo(
() =>
isAdminOrDev
featureFlags.Providers && isAdminOrDev
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to extract this into some feature flags / business logic ruleset hook to make it DRY. I can easily see someone missing either of the rules.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, I've updated it.

…flag

Signed-off-by: Petr Bulánek <bulanek.petr@gmail.com>
@PetrBulanek PetrBulanek requested a review from tomkis December 10, 2025 08:52
() =>
ITEMS.filter(({ featureName }) => {
if (featureName === 'Providers') {
return featureFlags[featureName] && isAdminOrDev;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think useCanManageProviders can be used here as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed that, good catch! :-)

…eature flag

Signed-off-by: Petr Bulánek <bulanek.petr@gmail.com>
@PetrBulanek PetrBulanek requested a review from kapetr December 10, 2025 15:28
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 11, 2025
@PetrBulanek PetrBulanek merged commit ae7b0ad into main Dec 11, 2025
8 checks passed
@PetrBulanek PetrBulanek deleted the ui/manage-agents-under-flag branch December 11, 2025 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI - Remove "Add Agent" button from GUI

3 participants