You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _posts/2025-06-27-a2a-project-lanunches-java-sdk.adoc
+187-5Lines changed: 187 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,12 +15,11 @@ The agent revolution just took a massive leap forward! Following the
15
15
recent landmark https://developers.googleblog.com/en/google-cloud-donates-a2a-to-linux-foundation/[announcement that Google has donated the Agent2Agent
16
16
(A2A) protocol to the Linux Foundation], we’re thrilled to announce the
17
17
launch of the *https://github.com/a2aproject/a2a-java[A2A Java SDK]*, built by WildFly and Quarkus teams in close collaboration, and now contributed to the official A2A project.
18
-
teams’ contribution.
19
18
20
19
21
20
=== A New Era Under Linux Foundation Stewardship
22
21
23
-
The [A2A](https://a2aproject.github.io/A2A/latest/specification) protocol’s transition to the Linux Foundation represents more
22
+
The https://a2aproject.github.io/A2A/latest/specification[A2A] protocol’s transition to the Linux Foundation represents more
24
23
than just a change of governance: it’s a commitment to vendor-neutral,
25
24
community-driven innovation. Similar how WildFly and Quarkus both recently joined CommonHaus fouundation. This ensures A2A as a critical interoperability
26
25
standard remains open and accessible to all. With more than 100
@@ -49,10 +48,193 @@ infrastructure +
49
48
Python, JavaScript, or any A2A-compatible language +
Pretty straightforward, right? The SDK provides all the necessary
189
+
components to create agent cards, handle agent execution, and manage
190
+
communication between agents.
191
+
192
+
And when it comes to client-side development, it's even easier. The SDK
193
+
includes a simple HTTP client that allows you to interact with A2A agents
194
+
using the A2A protocol. This client abstracts away the complexities of
195
+
the protocol, making it easy to send messages, receive responses, and
196
+
manage agent interactions. Creating an A2A client in Java is as simple as:
197
+
198
+
==== 1. Create an A2A client
199
+
200
+
[source,java]
201
+
----
202
+
// Create an A2AClient (the URL specified is the server agent's URL, be sure to replace it with the actual URL of the A2A server you want to connect to)
203
+
A2AClient client = new A2AClient("http://localhost:1234");
204
+
----
205
+
206
+
==== 2. Send a message to the A2A server agent
207
+
208
+
[source,java]
209
+
----
210
+
// Send a text message to the A2A server agent
211
+
Message message = A2A.toUserMessage("tell me a joke"); // the message ID will be automatically generated for you
212
+
MessageSendParams params = new MessageSendParams.Builder()
0 commit comments