Set Plugin Enabled • AI Agent SDK

set_plugin_enabled: Persist a plugin's enabled state to the config the runtime reads.

set_plugin_enabled

Function

</div>

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

python
def set_plugin_enabled(name: str, enabled: bool) -> Path

Parameters

ParamField str

Plugin name to enable/disable.

ParamField bool

True to add to the allow-list, False to remove it.

Returns

ResponseField Path

The path of the config file that was written.

Uses

  • target.exists
  • clear_config_cache
  • ValueError

Source

View on GitHub

praisonaiagents/config/loader.py at line 741


Related Documentation