Java SDK for the Agent2Agent (A2A) Protocol. Multi-module Maven project (io.github.a2asdk 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 POJOs 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/
tck/— Technology Compatibility Kit (protocol conformance tests)tests/— Integration testsextras/— Optional add-ons (OpenTelemetry, JPA task/notification stores, replicated queue manager, Vert.x HTTP client)integrations/— Runtime integrations (e.g., MicroProfile Config)boms/— Bill of Materials POMs (sdk, extras, reference, test-utils)examples/— Sample applications (helloworld, cloud-deployment)
- Package root:
io.a2a - 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
io.a2a.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)
- 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
- 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
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
💡 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.