Wildfly A2A Feature Pack
39by rhusar
A WildFly feature pack implementing the open-standard Agent2Agent (A2A) Protocol to enable universal interoperability and seamless collaboration between AI agents across diverse frameworks and vendors.
Getting Started
README
:toc: = WildFly A2A Feature Pack
WARNING: This is an unsupported experimental POC implementation. Use with caution.
A WildFly feature pack implementing the open-standard Agent2Agent (A2A) Protocol to enable universal interoperability and seamless collaboration between AI agents across diverse frameworks and vendors.
== Building
WARNING: To pass all tests, a gRPC Feature Pack with fix for https://github.com/wildfly-extras/wildfly-grpc-feature-pack/issues/430 is required.
Thus, temporarily use an unrelease version compiled from the main branch.
First, clone and build the https://github.com/wildfly-extras/wildfly-grpc-feature-pack[wildfly-grpc-feature-pack]:
[source,bash]
git clone https://github.com/wildfly-extras/wildfly-grpc-feature-pack.git cd wildfly-grpc-feature-pack ./mvnw install -DskipTests
Then, build the A2A feature pack:
[source,bash]
git clone https://github.com/rhusar/wildfly-a2a-feature-pack.git cd wildfly-a2a-feature-pack ./mvnw install -DskipTests
== Provisioning with Maven
Use the wildfly-maven-plugin to provision WildFly with the A2A feature pack.
=== A2A Server with All Transports (JSON-RPC, gRPC, REST)
For gRPC support, include the https://github.com/wildfly-extras/wildfly-grpc-feature-pack[wildfly-grpc-feature-pack]:
[source,xml]
== Layers
The feature pack provides the following Galleon layers:
|=== |Layer |Description
|a2a |Base layer with A2A subsystem
|a2a-client-jsonrpc |A2A client with JSON-RPC 2.0 over HTTP transport
|a2a-client-grpc |A2A client with gRPC binary protocol transport
|a2a-client-http-json |A2A client with RESTful HTTP/JSON transport
|a2a-server-jsonrpc |A2A server with JSON-RPC 2.0 over HTTP transport
|a2a-server-grpc |A2A server with gRPC binary protocol transport
|a2a-server-http-json |A2A server with RESTful HTTP/JSON transport
|===
Server layers include both the A2A SDK transport module and the Jakarta EE implementation. Client layers include only the SDK transport module.
== Running Integration Tests
Based on https://github.com/wildfly-extras/a2a-java-sdk-server-jakarta[a2a-java-sdk-server-jakarta] testing approach.
[source,bash]
mvn clean install # All tests mvn clean test -pl testsuite/integration/jsonrpc # JSON-RPC only mvn clean test -pl testsuite/integration/grpc # gRPC only mvn clean test -pl testsuite/integration/http-json # HTTP-JSON only
== Running the TCK
The feature pack includes a TCK (Test Compatibility Kit) module that runs the official A2A protocol TCK against WildFly.
=== Prerequisites
- Java 17 (or newer)
- Maven 3.9 (or newer)
- Python 3.11 (or newer) with
uvpackage manager
=== Build and Run TCK
- Build the feature pack:
[source,bash]
mvn clean install
- Build and provision the TCK server:
[source,bash]
mvn package -pl tck -am
. Start the WildFly server:
[source,bash]
SUT_JSONRPC_URL=http://localhost:8080 SUT_GRPC_URL=http://localhost:9555 SUT_REST_URL=http://localhost:8080 tck/target/wildfly/bin/standalone.sh --stability=preview
. Clone and set up the A2A TCK:
[source,bash]
git clone https://github.com/a2aproject/a2a-tck.git cd a2a-tck pip install uv uv pip install -e .
. Run the TCK:
[source,bash]
TCK_STREAMING_TIMEOUT=4.0 SUT_JSONRPC_URL=http://localhost:8080 SUT_GRPC_URL=http://localhost:9555 SUT_REST_URL=http://localhost:8080 uv run ./run_tck.py --sut-url http://localhost:8080 --category all --transports jsonrpc,grpc,rest --compliance-report report.json
. Stop the server:
[source,bash]
mvn wildfly:shutdown -pl tck
TCK Endpoints Reference
- JSON-RPC:
http://localhost:8080 - REST (HTTP-JSON):
http://localhost:8080 - gRPC:
localhost:9555(gRPC endpoint provisioned by the FP runs on separate Netty-back port)
== Resources
- https://a2aprotocol.ai/[A2A Protocol] - Official A2A protocol specification
- https://github.com/a2aproject/A2A[A2A] - Reference implementation of the A2A protocol
- https://github.com/a2aproject/a2a-java[a2a-java] - Java SDK for A2A protocol
- https://github.com/a2aproject/a2a-tck[a2a-tck] - Official A2A protocol TCK
- https://github.com/wildfly-extras/a2a-java-sdk-server-jakarta[a2a-java-sdk-server-jakarta] - Jakarta EE server implementation of A2A Java SDK
- https://github.com/wildfly-extras/wildfly-ai-feature-pack[wildfly-ai-feature-pack] - WildFly feature pack for AI/LLM integration (langchain4j)