Java SDK for the Agent2Agent (A2A) Protocol. Multi-module Maven project (org.a2aproject.sdk group) providing client and server libraries for A2A agent communication over JSON-RPC, gRPC, and REST transports.
Requires Java 17+. Tests output is redirected to files by default.
mvn clean installspec/— A2A specification types (Java records for the protocol)spec-grpc/— gRPC protobuf definitions and generated classescommon/— Shared utilities used across modulesclient/— Client SDKbase/— Core client APItransport/spi/— Transport SPItransport/jsonrpc/,transport/grpc/,transport/rest/— Transport implementations
server-common/— Server-side core (AgentExecutor, TaskStore, QueueManager)transport/— Server transport layer (jsonrpc, grpc, rest)http-client/— HTTP client abstractionjsonrpc-common/— Shared JSON-RPC utilitiesreference/— Reference server implementations built on Quarkuscommon/,jsonrpc/,grpc/,rest/multiversion-jsonrpc/,multiversion-rest/— Multi-version dispatching (v1.0 + v0.3)
tck/— Technology Compatibility Kit (protocol conformance tests)tests/— Integration and server-common testsserver-common/— Server-common integration testsmultiversion/— Multi-version integration tests (jsonrpc, rest, grpc)
extras/— Optional add-onscommon/— Shared classes across extras modulesopentelemetry/— OpenTelemetry integrationtask-store-database-jpa/— JPA-backed task storepush-notification-config-store-database-jpa/— JPA-backed push notification config storequeue-manager-replicated/— Kafka-based replicated queue managerhttp-client-vertx/— Vert.x HTTP clienthttp-client-android/— Android HTTP client
compat-0.3/— Backward compatibility layer for A2A protocol v0.3integrations/— Runtime integrations (e.g., MicroProfile Config)test-utils-docker/— Test utilities for conditional Docker-based test executionboms/— Bill of Materials POMs (sdk, extras, reference, test-utils)examples/— Sample applications (helloworld, cloud-deployment)
- Package root:
org.a2aproject.sdk - Serialization: Gson (see
gson.versionin parent POM) - Null safety: NullAway + JSpecify annotations enforced via Error Prone
- Reference server runtime: Quarkus
- Testing: JUnit 5, Mockito, REST Assured, Testcontainers
- Import statements are sorted
- Remove any unused import statements
- Do not use "star" imports (eg
import java.util.*) - Use Java
recordfor immutable data types - Use
@Nullable(from org.jspecify.annotations) for optional fields - Use
org.a2aproject.sdk.util.Assert.checkNotNullParam()in the compact constructor to validate required fields - Use
List.copyOf()andMap.copyOf()for defensive copying of collections - Apply the Builder pattern for records with many fields (see
AgentCard.javaas reference) - Do not split Java packages across Maven modules in production code (each package must belong to exactly one module). Test code may share a package with production code to access package-private members.
- Be concise
- Try to use existing code instead of generating new similar code
- Use the same code convention than existing code. If the existing convention seems incorrect, make suggestion before doing any changes
The docs site (docs/) is built with Roq (a Quarkus-based static site generator). Content is organized into versioned folders under docs/content/<version>/ (e.g. docs/content/1_1_0_Final/, docs/content/dev/). Version directory names use underscores instead of dots to work around a Roq bug where dots in path components break GitHub Pages serving.
Editing rules:
- Only edit pages under
docs/content/dev/— released version folders are frozen snapshots and must not be modified - New versioned folders are created at release time (see RELEASE.md step 9)
Release announcement posts live under docs/content/posts/ (one directory per release). Each post directory must contain:
index.adoc(orindex.md) — the post content, withimage: announce.pngin the YAML frontmatterannounce.png— the announcement banner image (PNG format, named exactlyannounce.png)
The announce.png filename is required. The image: announce.png frontmatter field is used by the post card component (on the home page and announces listing) to show the thumbnail. The theme's cover image block is hidden via CSS on post pages, so the image must also be added as the first line of the post content (after an empty line following the closing ---) so it appears after the title:
- AsciiDoc: blank line after
---, thenimage::announce.png[<alt text>](blank line required for block macro recognition) - Markdown: blank line after
---, then
Version metadata: Each version has a YAML file in docs/data/versions/ (e.g. dev.yml, 1.1.0.Final.yml) that defines the label, URL path, sort order, default/dev flags, and sidebar menu. When adding or removing a documentation page, update the menu list in docs/data/versions/dev.yml accordingly.
Running the docs site locally:
cd docs
mvn quarkus:dev- Follow the Conventional Commits for the commit title and message
- Always ask if the commit is related to a GitHub issue. If that's the case, add a
This fixes #{issue_number}at the end of the commit message
- update-a2a-proto — Update the gRPC proto file
a2a.protofrom upstream and regenerate Java sources - fix-tck-issue — Analyze and fix A2A TCK compatibility issues across transports
- release-a2a — Guide the full release process: version bump, CI, tagging, Maven Central deploy, docs, SNAPSHOT bump
mvn clean install— Clean build of the project
For detailed architectural documentation:
- EventQueue & Event Processing:
.claude/architecture/EVENTQUEUE.md- Quick reference with architecture diagram and core components
- Queue Lifecycle: Two-level protection, fire-and-forget, late reconnections
- Request Flows: Non-streaming vs streaming, cleanup patterns
- Usage Scenarios: Real-world patterns and common pitfalls
- Compatibility with previous protocol versions:
- 0.3 protocol compatibility layer:
.claude/architecture/compatibility_0.3.md
- 0.3 protocol compatibility layer:
💡 Deep-dive docs are loaded on-demand when working in related areas.
See CONTRIBUTING.md. Fork the repo, create a branch per issue, submit PRs against main.