Contributing
Developer guide for contributing to the A2A Java SDK.
Contributing
See CONTRIBUTING.md for full contribution guidelines. Fork the repo, create a branch per issue, and submit PRs against main.
Build
Requires Java 17+. Tests output is redirected to files by default.
mvn clean install
Project Structure
Code Conventions
- Package root:
org.a2aproject.sdk - Serialization: Gson
- Null safety: NullAway + JSpecify annotations via Error Prone
- Reference server runtime: Quarkus
- Testing: JUnit 5, Mockito, REST Assured, Testcontainers
Style
- Sort import statements
- No star imports (e.g.
import java.util.*) - Use Java
recordfor immutable data types - Use
@Nullable(fromorg.jspecify.annotations) for optional fields - Use
org.a2aproject.sdk.util.Assert.checkNotNullParam()in compact constructors - Use
List.copyOf()andMap.copyOf()for defensive copying - Apply the Builder pattern for records with many fields (see
AgentCard.java)
gRPC Regeneration
Copy a2a.proto from upstream and adjust the java_package option:
option java_package = "org.a2aproject.sdk.grpc";
Then regenerate:
mvn clean install -Dskip.protobuf.generate=false -pl spec-grpc
Commit Messages
Follow Conventional Commits:
feat: add streaming support for REST transport
fix: handle null task in cancelTask flow
chore: bump quarkus to 3.x
If the commit relates to a GitHub issue, add This fixes #<issue_number> at the end of the commit body.
Architecture Deep Dives
Detailed architecture documentation lives in .claude/architecture/:
- EventQueue & Event Processing — Queue lifecycle, request flows, usage scenarios
- 0.3 Compatibility Layer — How v0.3 requests are converted to v1.0 internally
