> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Plugin Enabled • AI Agent SDK

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

# set\_plugin\_enabled

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**loader**](../modules/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 theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def set_plugin_enabled(name: str, enabled: bool) -> Path
```

## Parameters

<ParamField query="name" type="str" required={true}>
  Plugin name to enable/disable.
</ParamField>

<ParamField query="enabled" type="bool" required={true}>
  True to add to the allow-list, False to remove it.
</ParamField>

### Returns

<ResponseField name="Returns" type="Path">
  The path of the config file that was written.
</ResponseField>

## Uses

* `clear_config_cache`
* `ValueError`

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/config/loader.py#L633">
  `praisonaiagents/config/loader.py` at line 633
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Plugins Feature" icon="plug" href="/docs/docs/features/plugins" />
</CardGroup>
