-
Notifications
You must be signed in to change notification settings - Fork 395
Add a blog post about how to get started with Quarkus and A2A #2345
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
gsmet
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.
This is really cool, thanks!
|
@fjuma I have one small question: can the second application answer questions like: "find me a room in LA for 2 people the next week-end where the weather is nice" i.e. can it orchestrate both agents? |
|
🙈 The PR is closed and the preview is expired. |
Not at the moment. Currently, the host agent just delegates the question to one of the two agents and returns the response. It doesn't use the response from one agent to send a request to the other agent, but this would certainly be a nice extension to demonstrate at some point. |
|
Just a general note, am back from PTO and will catch up with Kabir on the release plans and then we'll update the date of this post accordingly. |
|
OK, making it draft for now then. Shout loudly when it's ready! |
b25b803 to
a3402df
Compare
|
This is now ready to be merged. |
|
@insectengine If you're around and could help with merging this, that would be great (we've just done our first release of the A2A Java SDK). I suspect @maxandersen / @cescoffier / @gsmet are offline now. Thanks! |
| <artifactId>a2a-java-sdk-server-quarkus</artifactId> <1> | ||
| </dependency> | ||
| ---- | ||
| <1> `a2a-java-sdk-server-quarkus` provides access to the core classes that make up the A2A specification and provides the HTTP endpoint that implements the A2A protocol. This dependency makes use of Quarkus Reactive Routes. To make use of Jakarta REST, the `a2a-java-sdk-server-jakarta` dependency can be used instead. |
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.
is this really using Quarkus Reactive Routes and not just jaxrs with reactive endpoints?
we dont really put jakarta in names historically thus just trying to grok the diff?
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.
a2a-java-sdk-server-quarkus has a dependency on quarkus-reactive-routes and makes use of the @Route annotation (see https://github.com/a2aproject/a2a-java/blob/main/sdk-quarkus/src/main/java/io/a2a/server/apps/quarkus/A2AServerRoutes.java#L77).
a2a-java-sdk-server-jakarta makes use of jaxrs with @POST annotations (e.g., see https://github.com/a2aproject/a2a-java/blob/main/sdk-jakarta/src/main/java/io/a2a/server/apps/jakarta/A2AServerResource.java).
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.
is this really using Quarkus Reactive Routes and not just jaxrs with reactive endpoints?
It is.
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.
+1
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.
Just to clarify, sdk-quarkus and sdk-jakarta are mutually exclusive.
sdk-quarkus should be used if running in Quarkus, and that uses Reactive Routes.
sdk-jakarta uses Jakarta RESTful web services, and is intended for running in WildFly, Tomcat etc. We currently test that with WildFly. Originally we tested that with Quarkus with 'legacy' quarkus-resteasy, but found when deploying in WildFly that we had to make some minor changes to the CDI beans for them to be valid in WildFly. Thus we thought it best to test that part in WildFly
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.
Instead of "To make use of Jakarta REST...", I've reworded this to the following as suggested by @kabir:
If not using Quarkus, the a2a-java-sdk-server-jakarta dependency can be used to expose an A2A server agent in a Jakarta server supporting CDI and Jakarta RESTful Web Services.
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.
Great post.
I made a few suggestions.
| <artifactId>a2a-java-sdk-server-quarkus</artifactId> <1> | ||
| </dependency> | ||
| ---- | ||
| <1> `a2a-java-sdk-server-quarkus` provides access to the core classes that make up the A2A specification and provides the HTTP endpoint that implements the A2A protocol. This dependency makes use of Quarkus Reactive Routes. To make use of Jakarta REST, the `a2a-java-sdk-server-jakarta` dependency can be used instead. |
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'm not sure it's totally correct, but I would rewrite it as follows:
| <1> `a2a-java-sdk-server-quarkus` provides access to the core classes that make up the A2A specification and provides the HTTP endpoint that implements the A2A protocol. This dependency makes use of Quarkus Reactive Routes. To make use of Jakarta REST, the `a2a-java-sdk-server-jakarta` dependency can be used instead. | |
| <1> `a2a-java-sdk-server-quarkus` provides access to the core classes that make up the A2A specification and provides the HTTP endpoint that implements the A2A protocol. This dependency utilizes Quarkus Reactive Routes (the low-level Quarkus HTTP layer). To utilize Quarkus REST, the `a2a-java-sdk-server-jakarta` dependency can be used instead. |
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.
Actually, sdk-jakarta doesn't work with quarkus-rest, only with legacy quarkus-resteasy.
As mentioned in https://quarkusio.zulipchat.com/#narrow/channel/187030-users/topic/.E2.9C.94.20Content.20based.20routing.20with.20quarkus-rest/with/524409609 with the reactive implementation of REST, quarkus-rest, the body has not been read at the stage we need to decide which endpoint to send it to.
My understanding is that quarkus-resteasy is no longer supported, so to keep things simple:
a2a-java-sdk-server-quarkusis for running in Quarkusa2a-java-sdk-server-jakartais for running in a Jakarta server supporting CDI and Jakara RESTful web services
|
|
||
| === Add a Class that Creates an A2A `AgentCard` | ||
|
|
||
| The `AgentCard` is a class that describes an A2A server agent's capabilities. This will be used by other agents or clients to understand what our weather agent can do. The A2A Java SDK will automatically expose this agent card at the server agent's `.well-known/agent.json` URI. For example, if our A2A server agent is running on http://localhost:10001, the agent card will be available at http://localhost:10001/.well-known/agent.json. |
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.
is it a class or an object?
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.
The AgentCard is a class. A class that produces an AgentCard needs to be added by the user.
| layout: post | ||
| title: 'Getting Started with Quarkus and the A2A Java SDK' | ||
| date: 2025-07-09 | ||
| tags: release |
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.
Not sure about release. I would use ai and probably a2a
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.
Updated.
131b9eb to
a4e797d
Compare
|
I've incorporated all the suggested changes, thanks! |
No description provided.