-
Notifications
You must be signed in to change notification settings - Fork 395
Add a blog post on how to get started with A2A Java SDK 0.3.0 #2389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@cescoffier @maeste Please review when you get a chance, thanks! |
cescoffier
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I've added a few questions - not related to the content, but to the A2A client/server implementation
| <2> The preferred transport for our A2A server agent, `JSON-RPC` in this example. This is the transport protocol available at the primary endpoint URL. | ||
| <3> The optional additional interfaces supported by our A2A server agent. This should include all supported transports. | ||
| <4> The primary endpoint URL should also be specified here for completeness. | ||
| <5> The gRPC transport URL, `localhost:9000`, indicating that our A2A server agent also supports gRPC. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was there any discussion on the public/private IP/URL issue?
Typically, a pod on kubernetes does not know its public IP (service name). So, the card cannot be published by it. Same in a container.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to define a property in application.properties file that specifies the public URL using an environment variable and then the agent card could reference this property?
| ===== gRPC Transport | ||
|
|
||
| To allow your client to support the gRPC transport for communication, simply add the following dependency to your project: | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For both the client and server, does it use Quarkus legacy gRPC or Quarkus "vertx-based" gRPC?
As I see port 9000, I believe it's the legacy server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're using the quarkus-grpc dependency but I see now that we're not setting quarkus.grpc.server.use-separate-server=false so I guess that means the legacy server is being used?
@kabir ^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fjuma Yes, I think so too https://quarkus.io/guides/grpc-reference#selecting-a-grpc-server
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cescoffier Thanks for pointing this out, I've created a2aproject/a2a-java#250 to track setting this property in our test configuration. We'll use this approach in the gRPC sample we create too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've also updated the code snippet in the blog post for this.
|
|
||
| // Create event consumers to handle responses that will be received from the A2A server | ||
| // (these consumers will be used for both streaming and non-streaming responses) | ||
| List<BiConsumer<ClientEvent, AgentCard>> consumers = List.of( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A single stream with a consumer using pattern matching may provide a slightly more elegant (to be checked) API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you provide more details on what you mean here? I'm not totally sure I'm following. Thanks!
|
Feel free to update the publication date and mark it ready for review. |
|
|
||
| == Recap: What's A2A? | ||
|
|
||
| Before we dive into the details, let's quickly recap what https://a2aproject.github.io/A2A/specification/[A2A] is. The Agent2Agent (A2A) Protocol is an open standard initially developed by Google and is now part of the Linux Foundation. It enables AI agents to communicate and collaborate with one another, regardless of each agent's underlying framework, language, or vendor. This is very important, as it's paving the way for polyglot multi-agent systems. The A2A protocol has been gaining a lot of traction since being announced just a few months ago. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Before we dive into the details, let's quickly recap what https://a2aproject.github.io/A2A/specification/[A2A] is. The Agent2Agent (A2A) Protocol is an open standard initially developed by Google and is now part of the Linux Foundation. It enables AI agents to communicate and collaborate with one another, regardless of each agent's underlying framework, language, or vendor. This is very important, as it's paving the way for polyglot multi-agent systems. The A2A protocol has been gaining a lot of traction since being announced just a few months ago. | |
| Before we dive into the details, let's quickly recap what https://a2a-protocol.org/latest/specification/[A2A] is. The Agent2Agent (A2A) Protocol is an open standard initially developed by Google and is now part of the Linux Foundation. It enables AI agents to communicate and collaborate with one another, regardless of each agent's underlying framework, language, or vendor. This is very important, as it's paving the way for polyglot multi-agent systems. The A2A protocol has been gaining a lot of traction since being announced just a few months ago. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks! Fixed.
602d4ec to
07ad7c4
Compare
|
@cescoffier Thanks for the feedback! We've now released 0.3.0.Alpha1 so this blog post is ready to be published. I've updated this post as discussed in the comments and marked this as ready for review. Thanks! |

Creating this a draft PR since A2A Java SDK 0.3.0.Alpha1 hasn't been released yet but would like to get feedback on this in the meantime.