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

# Plugins and extensions

> Use SessionRpc in Laravel Copilot SDK to manage plugins and extensions for a session.

## Plugins and extensions

Scope: SessionRpc (per-session operations tied to a Session)

For an overview of RPC and the list of all RPC pages, see [RPC](https://kawax.biz/en/packages/laravel-copilot-sdk/rpc.md).

```php theme={null}
// plugins (experimental: plugin list)
$session->rpc()->plugins()->list();
// To target direct installs with the same name, pass the directSourceId from list() in names
$session->rpc()->plugins()->enable(['names' => ['opaque-direct-source-id']]);
$session->rpc()->plugins()->disable(['names' => ['opaque-direct-source-id']]);
// Reload plugins
$session->rpc()->plugins()->reload();
// Reload with options
use Revolution\Copilot\Types\Rpc\PluginsReloadRequest;

$session->rpc()->plugins()->reload(new PluginsReloadRequest(
    reloadMcp: true,      // Reload MCP server settings
    reloadHooks: true,    // Reload hooks
    reloadCustomAgents: false, // Don't reload custom agents
));
// Get the session's soft plugin defaults (doesn't persist settings or install anything)
$defaults = $session->rpc()->plugins()->getDefaults(); // SessionPluginDefaults
// $defaults->defaultEnabledPlugins is the result of managed defaults overriding team defaults
// $defaults->teamDefaultEnabledPlugins holds the team-only defaults
// $defaults->extraKnownMarketplaces is the fallback used at install time

// extensions (experimental: extension management)
$policy = $session->rpc()->extensions()->getPolicy(); // ExtensionManagedPolicy
// $policy->standalone is allowed / plugin_only / pending
// The policy is a snapshot, not a launch-authorization token. Don't use it for actual launch decisions
$session->rpc()->extensions()->list();
$session->rpc()->extensions()->enable(new ExtensionsEnableRequest(id: 'project:my-ext'));
$session->rpc()->extensions()->disable(new ExtensionsDisableRequest(id: 'project:my-ext'));
$session->rpc()->extensions()->reconcile(); // host-only: resyncs effective membership and returns the settled list
$session->rpc()->extensions()->reload();
```


## Related topics

- [SessionRpc overview](https://kawax.biz/en/packages/laravel-copilot-sdk/rpc/session-overview.md)
- [RPC (Remote Procedure Call)](https://kawax.biz/en/packages/laravel-copilot-sdk/rpc.md)
- [Skills, plugins, agents, instructions, and extensions](https://kawax.biz/en/packages/laravel-copilot-sdk/rpc/server-skills-plugins.md)
- [ServerRpc overview](https://kawax.biz/en/packages/laravel-copilot-sdk/rpc/server-overview.md)
- [Plugin Directories](https://kawax.biz/en/packages/laravel-copilot-sdk/plugin-directories.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.