Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Bug]: AgentCard REQUIRED fields are never validated

Aperta
#1,267 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

maintainers-only
What happened?

AgentCard marks 8 fields field_behavior = REQUIRED (https://github.com/a2aproject/A2A/blob/main/specification/a2a.proto#L362-L399): name, description, supported_interfaces, version, capabilities, default_input_modes, default_output_modes, skills.

Nothing in the SDK checks them. proto3 has no required keyword and the annotation is inert metadata, so an empty card is constructible and travels the whole pipeline unchallenged:

AgentCard()   # -> served as HTTP 200 with body {}

None of the methods that accept a card validate it:

  • create_agent_card_routes(agent_card=...)
  • DefaultRequestHandler(agent_card=..., extended_agent_card=...) and on_get_extended_agent_card — validates the request, never the returned card
  • agent_card_to_dict(card)

Correct fix: call the existing validate_proto_required_fields where the card is passed. This would introduce breaking changes for clients that rely on non-spec compliant agent card.

Suggested first step: log a warning when validation fails rather than raising, which is non-breaking and surfaces the problem to the user, with enforcement by default deferred to a major version.

Relevant log output

Code of Conduct
  • I agree to follow this project's Code of Conduct
Lingua principale
Python
Stelle
2.2k
Fork
499
Merge medio
3g 20h
PR unite (30g)
32

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di a2aproject/a2a-python

Tutte le issue di a2aproject/a2a-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.