langchain-ai/deepagents · error · MarketplaceError
Cannot install {plugin_id}: {exc}
Error message
Cannot install {plugin_id}: {exc} What it means
After source materialization, install_plugin calls load_manifest; a PluginManifestError (missing or invalid manifest) is wrapped into MarketplaceError with 'Cannot install <id>: ...'. The plugin's source exists but its manifest does not parse or fails required validation, so installation is refused.
Source
Thrown at libs/code/deepagents_code/plugins/discovery.py:232
Discovered plugin instance loaded from the cache path.
Raises:
MarketplaceError: If the marketplace/plugin cannot be resolved, the
source is unsupported, or the cached plugin fails to load.
"""
load_installed_plugins(strict=True)
load_enabled_plugin_ids(strict=True)
marketplace, entry = _resolve_marketplace_and_entry(plugin_id)
rejections: list[str] = []
source_root = materialize_plugin_source(marketplace, entry, rejections=rejections)
if source_root is None:
raise MarketplaceError(unresolved_source_message(plugin_id, entry, rejections))
try:
manifest, _manifest_path, manifest_warnings = load_manifest(
source_root, fallback_name=entry.name
)
except PluginManifestError as exc:
msg = f"Cannot install {plugin_id}: {exc}"
raise MarketplaceError(msg) from exc
for warning in manifest_warnings:
logger.debug("Plugin install warning for %s: %s", plugin_id, warning)
version = manifest.version if manifest is not None else None
cache_path = cache_and_register_plugin(
plugin_id,
source_root,
version=version,
validate=partial(
_validate_plugin_copy,
plugin_id=plugin_id,
fallback_name=entry.name,
),
)
View on GitHub (pinned to a1af029e6e)
Solutions
- Open the plugin's manifest in the source root and fix the reported field/syntax error.
- Validate the manifest against the current schema expected by load_manifest.
- Re-materialize the plugin source (refresh the marketplace) in case the copy is incomplete or stale.
- If a schema change broke an older manifest, update the plugin or pin a compatible version.
- As a user, report the broken manifest to the plugin maintainer with the embedded error text.
Example fix
// before (manifest missing version)
{"name": "widget"}
// after
{"name": "widget", "version": "1.2.0"} Defensive patterns
Strategy: validation
Validate before calling
import json
from pathlib import Path
def manifest_ok(root: Path) -> bool:
mf = next(root.glob("manifest.*"), None)
if mf is None:
return False
try:
data = json.loads(mf.read_text())
except (ValueError, OSError):
return False
return bool(data.get("name")) and bool(data.get("version"))
assert manifest_ok(Path("plugins/widget")), "manifest missing or invalid" Type guard
def has_valid_manifest(data: dict) -> bool:
return isinstance(data.get("name"), str) and isinstance(data.get("version"), str) Try / catch
from deepagents_code.plugins.discovery import MarketplaceError, install_plugin
try:
install_plugin("widget@internal")
except MarketplaceError as exc:
if str(exc).startswith("Cannot install"):
print("fix the plugin manifest:", exc) # embedded PluginManifestError detail
else:
raise Prevention
- Validate manifests against the current schema before publishing plugins.
- Keep name/version present and correctly typed in every manifest.
- Re-materialize the source if the manifest file is missing from the local copy.
- Pin plugin versions when schema changes ship in the loader.
- CI-check manifests of every plugin release.
When it happens
Trigger: load_manifest(source_root, fallback_name=entry.name) raises PluginManifestError — malformed manifest file, missing required fields, invalid name/version values, or an unreadable manifest file in the materialized source root.
Common situations: A plugin author shipped a broken manifest (bad JSON/TOML, missing name/version); a manifest schema change in a newer code version rejecting older manifests; the materialized copy lost the manifest file; a release process stripping non-package files.
Related errors
- Invalid plugin name: {name!r}
- modes can only be provided when agent is a factory
- models can only be provided when agent is a factory
- -32602
- Could not parse embedded resource block. Block expected eith
AI-assisted analysis of langchain-ai/deepagents@a1af029e6e (2026-08-29).
Data as JSON: /api/errors/0221205a1c57df3b.
Report an issue: GitHub.