a2aproject / a2aproject/A2A

Support relative URLs in agent.json card

Aberta
#160 0 comentários 6 reações 1 responsável Reivindicada por @kthota-g Ver no GitHub
Linguagem predominante
Shell
Estrelas
25.7k
Forks
2.6k
Merge médio
3d 6h
PRs com merge (30d)
16

Descrição

I have implemented an agent card in a python FastAPI application at the `.well-known/agent.json`. And I can read that correctly in the example CLI application.

If I set the URL to be a relative path inside of the agent card then I get the following error:
```python
File "C:\Users\\Documents\A2A\samples\python\.venv\Lib\site-packages\httpx\_transports\default.py", line 118, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.UnsupportedProtocol: Request URL is missing an 'http://' or 'https://' protocol.
```

As it stands right now, I would have to add extra configuration logic to my application to template the URL into the agent card response. I cannot just hardcode localhost or example.com since it changes across dev/production. Since the client already needs to know the domain name to fetch the agent card in the first place this seems redundant.

It should be possible to map `http://localhost:8000/.well-known/agent.json` with a url `/a2a/agent` to `http://localhost:8000/a2a/agent.json`

The only issue I see with this feature would be that the [Curated Discovery (Registry-Based)](https://google.github.io/A2A/#/topics/agent_discovery?id=curated-discovery-registry-based) would become harder, though this can be solved by having the registry service resolve the URL at the time it is added to the registry.

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.