Skip to content

fix(a2a): read A2A 1.0 agent cards in the a2a toolset - #4572

Open
smashingtags wants to merge 2 commits into
docker:mainfrom
smashingtags:INFRA-255-a2a-v1-client
Open

smashingtags wants to merge 2 commits into
docker:mainfrom
smashingtags:INFRA-255-a2a-v1-client

Conversation

@smashingtags

Copy link
Copy Markdown

Fixes #4571.

Since #4041, serve a2a publishes A2A 1.0 agent cards (supportedInterfaces, no top-level url), but the a2a toolset still used a2a-go v0.3. Its resolver found no interfaces on those cards, so calling any agent served by serve a2a failed at toolset start with no compatible transports found: available transports - [].

This moves pkg/tools/a2a to a2a-go/v2:

  • Cards are parsed with a2av0.NewAgentCardParser(), which reads both the 1.0 and the 0.3 shape.
  • The client registers the 0.3 JSON-RPC transport (a2av0.WithJSONRPCTransport) alongside the 1.0 one, so agents behind older A2A servers keep working.
  • The request and text extraction use the v2 types.

Tests

  • New TestToolSetCallsA2AV1Server serves a 1.0 card from an a2a-go/v2 server, the same shape serve a2a produces. It fails on main with the error above and passes here.
  • The existing tests, which serve 0.3 cards from a2a-go v0 servers, still pass. Removing the a2av0.WithJSONRPCTransport option makes four of them fail with available transports - [JSONRPC_0.3.0], so they cover the compatibility path.
  • golangci-lint v2.14.0, go run ./lint . and go mod tidy --diff are clean.

Also checked by hand with the two-file setup from #4571: a client built from this branch calls an agent served by this branch, and also one served by v1.128.0.

Separately, I noticed replies come back doubled (an agent answering PONG arrives as PONGPONG). That already happens with v1.128.0 on both ends, so it isn't part of this change. Happy to look at it in a follow-up.

Copilot AI balanced review requested due to automatic review settings October 12, 2026 00:25
@smashingtags
smashingtags requested a review from a team as a code owner October 12, 2026 00:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@aheritier aheritier added area/a2a Agent-to-Agent protocol, A2A server, inter-agent communication area/tools For features/issues/fixes related to the usage of built-in and MCP tools kind/fix PR fixes a bug (maps to fix:). Use on PRs only. status/needs-signed-commits Some commits in the PR are signed with a valid SSH/GPG key labels Oct 12, 2026
@aheritier

Copy link
Copy Markdown
Collaborator

👋 Some commits in this PR are not signed and verified by GitHub. Please sign your commits with a GPG or SSH key registered in your GitHub account, then force-push.

Commits that are not verified: dd95a9a, 9491e4f

See GitHub's guide on signing commits for setup instructions. I've added status/needs-signed-commits; it will be removed automatically once every commit in this PR carries a valid GitHub-verified signature.

Reproduces docker#4571: the toolset cannot read the 1.0 agent card that
serve a2a publishes since the move to adka2a/v2.
@smashingtags
smashingtags force-pushed the INFRA-255-a2a-v1-client branch from 9491e4f to cd65d7c Compare October 12, 2026 00:32
Since the move to adka2a/v2, serve a2a publishes 1.0 cards
(supportedInterfaces, no top-level url), but the a2a toolset still used
a2a-go v0.3. Its resolver found no interfaces on those cards and every
call failed with "no compatible transports found".

Move the toolset to a2a-go/v2. Cards are parsed with the a2av0 parser,
which reads both shapes, and the client registers the v0.3 JSON-RPC
transport alongside the 1.0 one, so agents behind older A2A servers keep
working.

Fixes docker#4571
@smashingtags smashingtags reopened this Oct 12, 2026
@smashingtags

Copy link
Copy Markdown
Author

Thanks @aheritier. Both commits are now signed and show as verified (7833de5, f6ab3ff), same content as before. GitHub briefly closed the PR while I replaced the branch; it's reopened.

@aheritier aheritier removed the status/needs-signed-commits Some commits in the PR are signed with a valid SSH/GPG key label Oct 12, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/a2a Agent-to-Agent protocol, A2A server, inter-agent communication area/tools For features/issues/fixes related to the usage of built-in and MCP tools kind/fix PR fixes a bug (maps to fix:). Use on PRs only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

a2a toolset cannot call agents served by 'serve a2a' since v1.129 (A2A 1.0 card vs v0.3 client)

3 participants