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
def set_plugin_enabled(name: str, enabled: bool) -> PathParameters
ParamField
strPlugin name to enable/disable.
ParamField
boolTrue to add to the allow-list, False to remove it.
Returns
ResponseField
PathThe path of the config file that was written.
Uses
target.existsclear_config_cacheValueError
Source
View on GitHubpraisonaiagents/config/loader.py at line 741