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-4Lines changed: 187 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ teams’ contribution.
20
20
21
21
=== A New Era Under Linux Foundation Stewardship
22
22
23
-
The [A2A](https://a2aproject.github.io/A2A/latest/specification) protocol’s transition to the Linux Foundation represents more
23
+
The https://a2aproject.github.io/A2A/latest/specification[A2A] protocol’s transition to the Linux Foundation represents more
24
24
than just a change of governance: it’s a commitment to vendor-neutral,
25
25
community-driven innovation. Similar how WildFly and Quarkus both recently joined CommonHaus fouundation. This ensures A2A as a critical interoperability
26
26
standard remains open and accessible to all. With more than 100
@@ -49,10 +49,193 @@ infrastructure +
49
49
Python, JavaScript, or any A2A-compatible language +
Pretty straightforward, right? The SDK provides all the necessary
190
+
components to create agent cards, handle agent execution, and manage
191
+
communication between agents.
192
+
193
+
And when it comes to client-side development, it's even easier. The SDK
194
+
includes a simple HTTP client that allows you to interact with A2A agents
195
+
using the A2A protocol. This client abstracts away the complexities of
196
+
the protocol, making it easy to send messages, receive responses, and
197
+
manage agent interactions. Creating an A2A client in Java is as simple as:
198
+
199
+
==== 1. Create an A2A client
200
+
201
+
[source,java]
202
+
----
203
+
// 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)
204
+
A2AClient client = new A2AClient("http://localhost:1234");
205
+
----
206
+
207
+
==== 2. Send a message to the A2A server agent
208
+
209
+
[source,java]
210
+
----
211
+
// Send a text message to the A2A server agent
212
+
Message message = A2A.toUserMessage("tell me a joke"); // the message ID will be automatically generated for you
213
+
MessageSendParams params = new MessageSendParams.Builder()
0 commit comments