Files
baserow/docs/development/feature-flags.md
T
Jérémie Pardou ad80341c03 feat: add Agent subject type (#5851)
* Add workspace Agents and permission management

* fix: remove all duplicate team subject memberships

* fix: align agent team role inheritance with users

* fix: delegate workspace role storage to subject types

* fix: preserve agent team memberships through trash

* Fix migration conflict

* fix: save agent settings pages independently

* fix: preserve agent roles across license changes

* fix: stabilize agent list pagination

* fix: filter agent websocket events by list permission

* fix: authorize agent team membership changes

* fix: serialize concurrent agent team updates

* fix: refresh agent teams through realtime events

* fix: restrict personal views to user subjects

* fix: deny agents with unavailable roles

* fix: exclude agents in trashed workspaces

* test: cover permanent agent access cleanup

* fix: gate agents in team selectors

* fix: accept trash option for preview actors

* fix: set native agent form button types

* fix: ignore stale agent modal saves

* fix: show permitted agent management actions

* fix: validate subject lookup fields

* perf: optimize batched user membership checks

* perf: cache agent team feature per list

* fix: map agent nonmember API errors

* fix: document paginated agent API schema

* fix: stabilize agent API schema operations

* fix: show agent name validation errors

* fix: show total agent count

* test: cover agent creation submissions

* test: cover agent and subject UI behavior

* docs: define direct subject role contracts

* fix: clarify team access management

* fix: use standard empty agents table

* fix: align agent name column styling

* refactor: move agent trash import

* refactor: align agent extension registry naming

* fix: recover agent team selector loading

* fix: validate every subject in role batches

* fix: ignore stale agent list responses

* perf: index recent team subjects

* fix: restore role handler imports

* Fix lint

* fix: reuse prefetched user memberships

* fix: preserve low priority role fallback

* fix: preserve trashed field permission subjects

* fix: open team picker when agent loading fails

* Fix tests
2026-09-21 16:32:32 +02:00

4.9 KiB

Feature flags

Baserow uses basic feature flags currently to allow unfinished features to be merged and/or released.

Available Feature Flags

Add/remove features flags to the list below:

  • agents — workspace Agent management and Agent creation.
  • ai-providers — AI provider management for the instance admin area and for workspace settings.
  • button-field: enables the button field type (#1722).

Preparing the ai-providers feature

Migration core.0120 runs in both flag states. It adds AI Agent eligibility to existing models, preserves their other features, and defaults omitted feature selections to AI Fields and AI Agent. Keeping the flag disabled requires no provider imports or republishing.

Review integration override compatibility before upgrading: these rules apply in both flag states, including to existing publications.

To enable database-backed providers on an existing installation:

  1. Pause AI settings changes and deploy with the flag disabled. Drain old web and worker processes. With FEATURE_FLAGS=*, first roll out an explicit list of the other flags and drain wildcard processes before deploying; alternatively, stop the old processes first.

  2. Preview both imports: environment settings become instance providers, and legacy workspace JSON becomes workspace providers. Review warnings and reconcile conflicts.

    just b manage migrate_ai_provider_settings --scope instance
    just b manage migrate_ai_provider_settings --scope workspace
    
  3. Apply instance settings first, then workspace settings:

    just b manage migrate_ai_provider_settings --scope instance --apply
    just b manage migrate_ai_provider_settings --scope workspace --apply
    

    Each scope is atomic and imports only missing providers, without printing credentials. Repeating an import does not synchronize changes to existing providers.

  4. Restart all web, backend, and worker processes with ai-providers enabled and drain the previous processes. Reload administrator/editor tabs before resuming settings changes, and all browser tabs before adding new provider types such as Google or Groq.

  5. Republish sites and workflows containing inherited legacy AI settings snapshots to adopt live database credentials and eligibility. Review pending draft changes first: republishing makes them live too. Explicit complete integration overrides remain independent.

For installations already using the flag, pause settings changes, upgrade with old processes stopped, and reload administrator/editor tabs before resuming. Keep the flag enabled unless usable legacy settings have been verified.

For rollback, retain the schema and verify legacy settings before disabling the flag. Database changes are not copied back; deleting an imported workspace provider also removes its legacy JSON. Verify published sites and workflows too.

Kuma's legacy model and provider-native credentials are not imported; see AI assistant configuration. Use the transition test plan to rehearse adoption and rollback.

Enabling feature flags

To enable specific feature flags set the environment variable FEATURE_FLAGS=feature1,feature2,feature3. Using just this would look like:

FEATURE_FLAGS=feature1,feature2,feature3 just dc-dev up -d

You could also add the variable to your .env.docker-dev file (for Docker development) or .env.local file (for local development).

Enabling all feature flags

Use the * feature flag to enable every single feature flag without having to specify each one.

FEATURE_FLAGS=* just dc-dev up -d

Naming convention

Feature flags should be:

  1. Alphanumeric with dashes.
  2. Not start or end with spaces (flags from the env variable will be trimmed for ease of use).
  3. Unique per feature.

Creating a feature flag

In the Backend

# Add variable with feature flag to baserow.core.feature_flag in format
# FF_<FEATURE_NAME> = "feature_name"
# i.e.
FF_FEATURE1 = "feature1"

# In your feature file import flag you need and feature flag function
from baserow.core.feature_flag import FF_FEATURE1, feature_flag_is_enabled

# Use to check if feature is enabled
if feature_flag_is_enabled(FF_FEATURE1):
    # do the feature

# or if you want to raise exception if the feature is not enabled
feature_flag_is_enabled(FF_FEATURE1, raise_if_disabled=True)

In the Web-frontend

// add feature flag variable in @core/plugins/featureFlags.js in format
// FF_<FEATURE_NAME> = "feature_name"
// i.e.
export const FF_FEATURE1 = "feature1";

methods: {
    someComponentMethod();
    {
        if (this.$featureFlagIsEnabled(FF_FEATURE1)) {
            // do the feature
        }
    }
}