Skip to main content

set_plugin_enabled

Function
This function is defined in the loader module.
Persist a plugin’s enabled state to the config the runtime reads. Mutates the plugins.enabled allow-list in the project’s config file (the same file get_enabled_plugins reads), creating .praisonai/config.yaml if no config exists yet. This is the single source of truth the CLI and runtime share — no separate JSON file.

Signature

Parameters

str
required
Plugin name to enable/disable.
bool
required
True to add to the allow-list, False to remove it.

Returns

Path
The path of the config file that was written.

Uses

  • clear_config_cache
  • ValueError

Source

View on GitHub

praisonaiagents/config/loader.py at line 633

Plugins Feature