#15022·onyx

[Bug] Non-admin users cannot create agents in Community Edition (v4.7+) due to LICENSE_ENFORCEMENT_ENABLED default

Author: Oht8wooWi8yait9nCreated Sep 23, 2026Updated Sep 25, 2026

Bug Description

In Onyx v4.7+, non-admin users in Community Edition deployments are unable to create agents. The "New Agent" button on /app/agents is greyed out, and submitting /app/agents/create fails with:

"Failed to create agent: You do not have the required permissions for this action." This occurs even when ENABLE_PAID_ENTERPRISE_EDITION_FEATURES=false is explicitly configured.

Documentation & Expected Behavior

According to the Understanding Permissions Documentation:

"Community Edition has no group permission configuration, so Create Agents is available to everyone." Authenticated users in Community Edition should be auto-granted Permission.ADD_AGENTS via CE_UNGATED_PERMISSIONS.

Root Cause

  1. env.template does not define LICENSE_ENFORCEMENT_ENABLED.
  2. In backend/onyx/utils/variable_functionality.py, _LICENSE_ENFORCEMENT_ENABLED defaults to "true".
  3. In set_is_ee_based_on_env_variable(), even if ENABLE_PAID_ENTERPRISE_EDITION_FEATURES=false, the fallback elif _LICENSE_ENFORCEMENT_ENABLED: triggers and calls global_version.set_ee().
  4. Although the startup log states:

    "Without a license this deployment behaves as Community Edition." global_version.is_ee_version() now returns True.

  5. In backend/onyx/auth/permissions.py:
    python
    if not global_version.is_ee_version() and user.account_type != AccountType.ANONYMOUS:
        granted |= CE_UNGATED_PERMISSIONS
    Because is_ee_version() is True, CE_UNGATED_PERMISSIONS (add:agents) is never granted.
  6. In seed_default_groups.py, the default Basic group is seeded only with ("Basic", "basic") which does not imply add:agents.
  7. Because default system groups are immutable (assert_group_config_is_editable), admins cannot enable agent creation in the UI.

Workaround

Explicitly setting LICENSE_ENFORCEMENT_ENABLED=false in .env prevents global_version.set_ee() from being called and restores CE behavior.

Suggested Fix

Either:

  • In permissions.py, check whether the instance actually has a valid license / enterprise features enabled rather than solely checking global_version.is_ee_version().
  • Or, include Permission.ADD_AGENTS in the default seed grants for the Basic group in seed_default_groups.py.