BerriAI/litellm · error · HTTPException

Agent '{agent_id}' has no agent card configured

Error message

Agent '{agent_id}' has no agent card configured

What it means

Raised in the A2A agent-card endpoint when the agent exists and the caller is permitted, but the agent record carries no agent_card_params — it was registered without a card, so there is nothing to serve at /.well-known/agent-card.json. This is a server-side configuration gap (agent defined but no card configured), distinct from 404 not-found and 403 not-allowed in the same handler.

Source

Thrown at litellm/proxy/agent_endpoints/a2a_endpoints.py:550

    try:
        agent: Final = _get_agent(agent_id)
        if agent is None:
            raise HTTPException(status_code=404, detail=f"Agent '{agent_id}' not found")

        # Check agent permission (skip for admin users)
        is_allowed: Final = await AgentRequestHandler.is_agent_allowed(
            agent_id=agent.agent_id,
            user_api_key_auth=user_api_key_dict,
        )
        if not is_allowed:
            raise HTTPException(
                status_code=403,
                detail=f"Agent '{agent_id}' is not allowed for your key/team. Contact proxy admin for access.",
            )

        if not agent.agent_card_params:
            raise HTTPException(
                status_code=404,
                detail=f"Agent '{agent_id}' has no agent card configured",
            )

        proxy_url: Final = get_custom_url(str(request.base_url), route=f"a2a/{agent_id}")
        agent_card = deepcopy(agent.agent_card_params)
        agent_card["url"] = proxy_url
        interfaces: Final = agent_card.get("supportedInterfaces")
        if isinstance(interfaces, list) and interfaces:
            interfaces[0]["url"] = proxy_url
        served_version: Final = _served_version(agent, request)
        agent_card = normalize_agent_card(agent_card, served_version)

        verbose_proxy_logger.debug("Returning agent card for '%s' with proxy URL: %s", agent_id, proxy_url)
        return JSONResponse(content=agent_card)

    except HTTPException:
        raise

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Configure an agent card for this agent in the proxy.

Example fix

Add agent card config for the agent.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/agent_endpoints/a2a_endpoints.py:550 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/f15940fc02dcfc5c. Report an issue: GitHub.