Skip to content

Conversation

@fjuma
Copy link
Collaborator

@fjuma fjuma commented Jun 26, 2025

No description provided.

Copy link
Member

@gsmet gsmet left a 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!

@gsmet
Copy link
Member

gsmet commented Jul 2, 2025

@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?

@github-actions
Copy link

github-actions bot commented Jul 2, 2025

🙈 The PR is closed and the preview is expired.

@fjuma
Copy link
Collaborator Author

fjuma commented Jul 2, 2025

@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?

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.

@fjuma
Copy link
Collaborator Author

fjuma commented Jul 2, 2025

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.

@gsmet gsmet marked this pull request as draft July 2, 2025 14:37
@gsmet
Copy link
Member

gsmet commented Jul 2, 2025

OK, making it draft for now then. Shout loudly when it's ready!

@fjuma fjuma force-pushed the a2a branch 2 times, most recently from b25b803 to a3402df Compare July 8, 2025 16:52
@fjuma fjuma marked this pull request as ready for review July 8, 2025 16:54
@fjuma
Copy link
Collaborator Author

fjuma commented Jul 8, 2025

This is now ready to be merged.

@fjuma
Copy link
Collaborator Author

fjuma commented Jul 8, 2025

@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.
Copy link
Member

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?

@geoand @cescoffier ^

Copy link
Collaborator Author

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).

@kabir @maeste ^

Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

Copy link
Contributor

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

Copy link
Collaborator Author

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.

Copy link
Member

@cescoffier cescoffier left a 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.
Copy link
Member

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:

Suggested change
<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.

Copy link
Contributor

@kabir kabir Jul 9, 2025

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-quarkus is for running in Quarkus
  • a2a-java-sdk-server-jakarta is 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.
Copy link
Member

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?

Copy link
Collaborator Author

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
Copy link
Member

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated.

@fjuma fjuma force-pushed the a2a branch 2 times, most recently from 131b9eb to a4e797d Compare July 9, 2025 13:35
@fjuma
Copy link
Collaborator Author

fjuma commented Jul 9, 2025

I've incorporated all the suggested changes, thanks!

@cescoffier cescoffier merged commit bb3c49e into quarkusio:main Jul 9, 2025
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.

7 participants