Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

[Bug]: AgentCard REQUIRED fields are never validated

Fechada
#1,267 0 comentários 0 reações 1 responsável Ver no GitHub

Mantenedores costumam responder em até 2 dias

@mykytanetipa já está trabalhando nisso.

Desde 22/9/2026.

  • #1279 de @Patrick-SCH03 — aberto

Avaliação

Esta issue ainda não foi avaliada.

Descrição

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)
  • signing

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
Linguagem predominante
Python
Estrelas
2.2k
Forks
518
Merge médio
3d 7h
PRs com merge (30d)
38

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de a2aproject/a2a-python

Todas as issues de a2aproject/a2a-python

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

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