langchain-ai/deepagents · error

Invalid plugin id {plugin_id!r}; expected name@marketplace

Error message

Invalid plugin id {plugin_id!r}; expected name@marketplace

What it means

split_plugin_id parses the canonical 'name@marketplace' plugin id using rsplit('@', 1). If the id contains no '@' at all, it cannot be split and ValueError is raised with the 'expected name@marketplace' message. Callers include remove_marketplace, discover_plugins, auto_update_plugins, and versioned_cache_path.

Source

Thrown at libs/code/deepagents_code/plugins/models.py:242

class PluginDiscoveryResult:
    """Result from plugin discovery."""

    plugins: tuple[PluginInstance, ...]
    warnings: tuple[str, ...] = ()


def split_plugin_id(plugin_id: str) -> tuple[str, str]:
    """Split a plugin id in `{plugin}@{marketplace}` form.

    Returns:
        Plugin and marketplace names.

    Raises:
        ValueError: If either part is missing.
    """
    if "@" not in plugin_id:
        msg = f"Invalid plugin id {plugin_id!r}; expected name@marketplace"
        raise ValueError(msg)
    plugin, marketplace = plugin_id.rsplit("@", 1)
    if not plugin or not marketplace:
        msg = f"Invalid plugin id {plugin_id!r}; expected name@marketplace"
        raise ValueError(msg)
    return plugin, marketplace

View on GitHub (pinned to a1af029e6e)

Solutions

  1. Include the marketplace suffix: pass 'name@marketplace' instead of the bare name.
  2. Look up the full id from the loaded marketplace's plugin entries or `plugin.plugin_id`.
  3. Migrate any stored ids from the legacy format to name@marketplace.

Example fix

// before
remove_plugin('lint')
// after
remove_plugin('lint@team-market')
Defensive patterns

Strategy: validation

Validate before calling

def ensure_plugin_id(pid: str) -> None:
    if "@" not in pid:
        raise ValueError(f"{pid!r} must be 'name@marketplace'")

Type guard

def is_valid_plugin_id(pid: object) -> TypeGuard[str]:
    return isinstance(pid, str) and "@" in pid

Try / catch

try:
    name, market = split_plugin_id(raw_id)
except ValueError as exc:
    logger.error("Bad plugin id %r: %s", raw_id, exc)
    return

Prevention

When it happens

Trigger: Passing a bare plugin name like 'my-plugin' (no @marketplace suffix) to any API that takes a plugin_id — e.g. remove_marketplace/plugin removal paths, discover_plugins, or cache path computation.

Common situations: Users typing only the plugin name in a command; old config/state records from before the name@marketplace scheme; composing the id with a different separator like ':' or '/'.

Related errors


AI-assisted analysis of langchain-ai/deepagents@a1af029e6e (2026-08-29). Data as JSON: /api/errors/b53582a0f530a2c6. Report an issue: GitHub.