langchain-ai/deepagents · error · MarketplaceError
Plugin {plugin_id!r} is not installed
Error message
Plugin {plugin_id!r} is not installed What it means
_require_installed_plugin checks the plugin id against load_installed_plugins(strict=True) and raises MarketplaceError when it is absent. This is the guard used by set_installed_plugin_enabled so enable/disable only mutates plugins that are actually installed. Strict mode also means a malformed registry file surfaces here rather than being silently ignored.
Source
Thrown at libs/code/deepagents_code/plugins/discovery.py:153
if record.source_type in {"github", "git", "url"} and resolved.is_relative_to(
cache_root
):
if resolved.is_dir():
shutil.rmtree(resolved, ignore_errors=True)
elif resolved.is_file():
resolved.unlink(missing_ok=True)
return removed
def _require_installed_plugin(plugin_id: str) -> None:
"""Raise when `plugin_id` does not identify an installed plugin.
Raises:
MarketplaceError: If the plugin is not installed.
"""
if plugin_id not in load_installed_plugins(strict=True):
msg = f"Plugin {plugin_id!r} is not installed"
raise MarketplaceError(msg)
@plugin_mutation_lock()
def set_installed_plugin_enabled(plugin_id: str, *, enabled: bool) -> None:
"""Set the enabled state of an installed plugin.
Args:
plugin_id: Plugin id in `{name}@{marketplace}` form.
enabled: Whether to enable the plugin.
"""
_require_installed_plugin(plugin_id)
set_plugin_enabled(plugin_id, enabled)
if enabled:
ensure_plugin_data_dir(plugin_id)
@plugin_mutation_lock()
def uninstall_plugin(plugin_id: str) -> None:View on GitHub (pinned to a1af029e6e)
Solutions
- List installed plugins and use the exact id (`name@marketplace`).
- Install the plugin first with `plugin install <id>` before enabling.
- If the registry file is corrupt, fix/restore its JSON or reinstall affected plugins.
- If the plugin was renamed, use the new id.
Example fix
// before
set_installed_plugin_enabled("widget", enabled=False) # MarketplaceError: Plugin 'widget' is not installed
// after
install_plugin("widget@internal")
set_installed_plugin_enabled("widget@internal", enabled=False) Defensive patterns
Strategy: validation
Validate before calling
from deepagents_code.plugins.discovery import load_installed_plugins
def ensure_installed(plugin_id: str) -> None:
if plugin_id not in load_installed_plugins(strict=True):
raise SystemExit(f"{plugin_id!r} not installed; run 'plugin install {plugin_id}'") Type guard
def is_installed(plugin_id: str, installed: list[str]) -> bool:
return plugin_id in installed Try / catch
from deepagents_code.plugins.discovery import MarketplaceError, set_installed_plugin_enabled
try:
set_installed_plugin_enabled("widget@internal", enabled=False)
except MarketplaceError as exc:
print(f"toggle skipped: {exc}") # install the plugin first Prevention
- Check installed plugins before toggling.
- Use ids exactly as listed (including the '@marketplace' suffix).
- Install before enable/disable.
- Keep the registry file tool-managed, not hand-edited.
- Handle plugin renames by re-checking ids after marketplace updates.
When it happens
Trigger: Calling set_installed_plugin_enabled(plugin_id, enabled=...) (or the CLI `plugin enable/disable`) with an id not in the installed-plugins registry, or with a registry that fails strict validation so the id cannot be found.
Common situations: Toggling a plugin after uninstalling it; using a plugin name without the `@marketplace` suffix; hand-editing or corrupting the installed-plugins JSON; a stale id after the plugin was renamed.
Related errors
AI-assisted analysis of langchain-ai/deepagents@a1af029e6e (2026-08-29).
Data as JSON: /api/errors/b587aac22332de0c.
Report an issue: GitHub.