From dee879ec2efebd035ef206c9520172fe0f4edf3b Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Wed, 28 Jan 2026 10:54:14 -0800 Subject: [PATCH] feat: .well-known/agent.json --- litellm/proxy/agent_endpoints/a2a_endpoints.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/litellm/proxy/agent_endpoints/a2a_endpoints.py b/litellm/proxy/agent_endpoints/a2a_endpoints.py index a21f3291d31..24727aacd75 100644 --- a/litellm/proxy/agent_endpoints/a2a_endpoints.py +++ b/litellm/proxy/agent_endpoints/a2a_endpoints.py @@ -119,6 +119,11 @@ async def _handle_stream_message( tags=["[beta] A2A Agents"], dependencies=[Depends(user_api_key_auth)], ) +@router.get( + "/a2a/{agent_id}/.well-known/agent.json", + tags=["[beta] A2A Agents"], + dependencies=[Depends(user_api_key_auth)], +) async def get_agent_card( agent_id: str, request: Request, @@ -127,6 +132,10 @@ async def get_agent_card( """ Get the agent card for an agent (A2A discovery endpoint). + Supports both standard paths: + - /.well-known/agent-card.json + - /.well-known/agent.json + The URL in the agent card is rewritten to point to the LiteLLM proxy, so all subsequent A2A calls go through LiteLLM for logging and cost tracking. """