# add_installed_plugin

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/plugins/store/add_installed_plugin)

Add or replace the record for `plugin_id` in `installed_plugins.json`.

## Signature

```python
add_installed_plugin(
    plugin_id: str,
    *,
    install_path: str,
    version: str | None,
) -> InstalledPluginEntry
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `plugin_id` | `str` | Yes | Plugin id in `{name}@{marketplace}` form. |
| `install_path` | `str` | Yes | Absolute path to the cached plugin root. |
| `version` | `str \| None` | Yes | Version declared by the plugin manifest, if any. |

## Returns

`InstalledPluginEntry`

The written install entry.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/caaa7e7c12d214afa5cf0a1afed8eb6232aa6f7b/libs/code/deepagents_code/plugins/store.py#L436)