langchain-ai/deepagents · error · MarketplaceError
Marketplace {name} must contain a plugins array
Error message
Marketplace {name} must contain a plugins array What it means
A valid marketplace manifest must contain a `plugins` key whose value is a JSON array. If `plugins` is missing or is not a list (e.g. a dict or string), MarketplaceError is raised with the marketplace's validated name in the message. Entries inside the array that fail parsing are skipped with warnings rather than raising.
Source
Thrown at libs/code/deepagents_code/plugins/marketplace.py:822
try:
raw = json.loads(manifest_path.read_text(encoding="utf-8"))
except json.JSONDecodeError as exc:
msg = f"Invalid JSON syntax in {manifest_path}: {exc}"
raise MarketplaceError(msg) from exc
except OSError as exc:
msg = f"Could not read marketplace manifest {manifest_path}: {exc}"
raise MarketplaceError(msg) from exc
if not isinstance(raw, dict):
msg = f"Marketplace manifest {manifest_path} must be a JSON object"
raise MarketplaceError(msg)
try:
name = _validate_name(raw.get("name"), allow_at=False)
except ValueError as exc:
raise MarketplaceError(str(exc)) from exc
plugins_raw = raw.get("plugins")
if not isinstance(plugins_raw, list):
msg = f"Marketplace {name} must contain a plugins array"
raise MarketplaceError(msg)
warnings: list[str] = []
plugins = tuple(
plugin
for entry in plugins_raw
if (plugin := _parse_entry(entry, warnings=warnings)) is not None
)
for warning in warnings:
logger.warning("%s", warning)
metadata = json_object(raw.get("metadata"))
return PluginMarketplace(
name=name,
root=root,
manifest_path=manifest_path,
metadata=metadata,
plugins=plugins,
warnings=tuple(warnings),
)
View on GitHub (pinned to a1af029e6e)
Solutions
- Change `plugins` to a JSON array of plugin entry objects (or add the key if missing).
- Check the manifest template/docs for the current schema and update the key name.
- Re-pull the marketplace repo to restore the canonical manifest.
Example fix
// before
{ "name": "team-corp", "plugins": { "a": "./plugins/a" } }
// after
{ "name": "team-corp", "plugins": [ { "id": "a", "source": "./plugins/a" } ] } Defensive patterns
Strategy: validation
Validate before calling
import json
def plugins_is_array(path) -> bool:
doc = json.loads(path.read_text(encoding="utf-8"))
plugins = doc.get("plugins") if isinstance(doc, dict) else None
return isinstance(plugins, list) and all(isinstance(e, dict) for e in plugins) Type guard
def has_plugins_array(doc: object) -> TypeGuard[dict]:
return isinstance(doc, dict) and isinstance(doc.get("plugins"), list) Try / catch
try:
mp = load_marketplace(root)
except MarketplaceError as exc:
if "must contain a plugins array" in str(exc):
fix_manifest_plugins_key(root)
raise Prevention
- Use the canonical manifest template with `plugins` as a list.
- Validate against a JSON Schema in CI before shipping manifests.
- Watch library release notes for manifest schema changes.
When it happens
Trigger: load_marketplace / _load_marketplace_file on a manifest where `plugins` is absent, set to an object `{}`, a string, or any non-list value.
Common situations: Hand-writing a manifest with `plugins: {}` keyed by plugin id; renaming the key (e.g. `plugin` singular); an upstream schema change in the manifest format; truncation dropping the array.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- Marketplace manifest {manifest_path} must be a JSON object
- External event kind must be one of {sorted(_VALID_KINDS)}; g
- Marketplace URL must return a JSON object: {_redact_url_cred
- Could not parse embedded resource block. Block expected eith
- {question_type} question {question_text!r} must not define '
AI-assisted analysis of langchain-ai/deepagents@a1af029e6e (2026-08-29).
Data as JSON: /api/errors/b7203b63d4aaa30e.
Report an issue: GitHub.