Skip to content

a2a: conform to external A2A clients — well-known path + spec SSE events #4815

Description

@asim

Problem (from the gap audit)

The A2A gateway works go-micro-to-go-micro but a real external A2A client (ADK/LangGraph/a2a-SDK) would not interoperate:

  • gateway/a2a/a2a.go:111,124,151 + client.go:42 — serves the Agent Card at /.well-known/agent.json, but A2A spec 0.3.0 serves it at /.well-known/agent-card.json. Standard discovery 404s.
  • a2a.go:587message/stream emits repeated full Task snapshots, not the spec's TaskStatusUpdateEvent / TaskArtifactUpdateEvent (kind:"status-update"|"artifact-update", with a final final:true). External SSE clients parse by kind and never see a terminal marker.
  • a2a.go:596 — a streaming error sets both result and error in one JSON-RPC response (spec violation; strict clients reject).

Scope

  • Serve the Agent Card at both /.well-known/agent-card.json (canonical) and /.well-known/agent.json (legacy alias).
  • Emit spec-shaped SSE update events (status-update / artifact-update) with a final status-update final:true, instead of full Task snapshots.
  • Never send result and error together — send a failed-Task status-update or an error, not both.

Acceptance

  • Tests assert: card is reachable at agent-card.json; the stream emits status-update/artifact-update events ending in final:true; no response carries both result and error.
  • go test ./gateway/a2a/..., go build ./..., golangci-lint run ./... pass.

Note

A follow-up (needs-human) is a real cross-framework conformance test against an actual third-party A2A SDK — none exists today, so all interop is self-certified.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions