Skip to content

feat: make adk work with a2a-go/v2#701

Open
yarolegovich wants to merge 24 commits intomainfrom
yarolegovich/a2a-v2
Open

feat: make adk work with a2a-go/v2#701
yarolegovich wants to merge 24 commits intomainfrom
yarolegovich/a2a-v2

Conversation

@yarolegovich
Copy link
Copy Markdown
Member

  • Copied the code to ./agent/remoteagent and ./server/adka2a to v2 directories.
  • Migrated the code in v2 directories to use a2a-go v2 types.
  • Changed the code in the original directories to delegate to the new code and serve as a type translation layer.
  • Deprecated original packages with a reference to v2 directories.

What this gives is that ADK can be used with a2a-go/v2 which implements A2A protocol v1 (as well as v0).

@dpasiukevich
Copy link
Copy Markdown
Collaborator

/gemini-review

1 similar comment
@dpasiukevich
Copy link
Copy Markdown
Collaborator

/gemini-review

@ysyneu
Copy link
Copy Markdown

ysyneu commented Apr 20, 2026

Hi @yarolegovich and @dpasiukevich — thanks for working on this.

We ran into the gap this PR fixes while integrating our ADK-based agent with a remote A2A server that implements protocol v1.0 via a2a-go/v2 (HTTP+JSON transport, supportedInterfaces card schema). On the shipped ADK (a2a-go v0.3.x) the client failed at NewFromCard with "no compatible transports found" because the v0.x card struct doesn't parse supportedInterfaces and there is no HTTP+JSON client transport factory registered.

To unblock ourselves we pinned our project to this PR's head (36f4c0d…) plus a2a-go/v2 v2.0.1 and switched our builder to google.golang.org/adk/agent/remoteagent/v2.NewA2A. End-to-end test against the live v1.0 server works as intended: SendStreamingMessage streams TaskArtifactUpdateEvents back, aggregatePartial yields partial session.Events, and they flow through the parent llmagent session out to our SSE client. No regressions observed elsewhere in the ADK bump (needed only minor interface updates on our side for memory.Service.AddSessionToMemory/SearchMemory renames and the new artifact.Service.GetArtifactVersion method).

A couple of questions, if you have a moment:

  1. Is there anything concrete blocking merge beyond the current conflict with main? Happy to help test additional scenarios or review if that would move things along.
  2. Any rough sense of timing? We'd like to drop our pseudo-version pin and consume this from a tagged release as soon as it's available.
  3. The PR description mentions the v0.x packages becoming a translation layer — is the long-term plan to remove them in a later major, or will they remain as compatibility shims?

Thanks again — this PR lands exactly the API we need, and the split into v2 subpackages is a clean migration path.

@baptmont
Copy link
Copy Markdown
Contributor

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the remote agent and A2A server components to integrate version 2 of the A2A SDK while maintaining backward compatibility for legacy configurations. The review feedback highlights several critical issues where errors from SDK conversion functions—specifically those handling events, artifacts, and message requests—are ignored, which could lead to runtime panics or silent failures. Additionally, a redundant conditional check in the client factory logic was identified as an opportunity for code simplification.

Comment thread agent/remoteagent/a2a_agent.go Outdated
Comment thread agent/remoteagent/a2a_agent.go Outdated
Comment thread server/adka2a/conversions.go Outdated
Comment thread server/adka2a/executor.go
Comment thread agent/remoteagent/a2a_agent.go Outdated
@yarolegovich
Copy link
Copy Markdown
Member Author

@ysyneu thanks for confirming there's demand for it, we'll resume the work on it

@jankrynauw
Copy link
Copy Markdown

Just pinned the branch (google.golang.org/adk v1.1.1-0.20260423095712-9cb6095c2e76) in one of our agents which makes use of a2a extensions (https://pkg.go.dev/go.alis.build/a2a/extension/a2ui), custom TaskStore (go.alis.build/a2a/tasks) etc. based on v2 and all seems to be working fine.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants