-
Notifications
You must be signed in to change notification settings - Fork 106
docs: add AGENTS.md coding guide #596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @ehsavoie, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new, detailed guide for AI agents to understand and interact with the A2A Java SDK, covering its core components, development practices, and architectural patterns. Simultaneously, it vastly improves the documentation for the 'extras' modules, offering in-depth explanations and usage scenarios for implementing production-grade persistence and distributed event management solutions, thereby enabling developers to build more scalable and resilient A2A applications. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces an excellent AGENTS.md coding guide, which will be a great resource for developers and AI agents working on this project. The guide is comprehensive and well-structured. Additionally, the extras/README.md has been significantly improved, providing much-needed clarity on the purpose and usage of the extras modules. My review includes a couple of suggestions to further enhance the documentation's clarity and consistency.
| ### Code Quality Standards | ||
|
|
||
| - **Null Safety**: Uses JSpecify annotations and NullAway for compile-time null checking | ||
| - **Error Handling**: Custom error types extending `JSONRPCError` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "Code Quality Standards" section states that custom error types extend JSONRPCError. This seems specific to the JSON-RPC transport. Since the SDK also supports gRPC and REST, which use different error handling mechanisms (e.g., gRPC status codes for gRPC, HTTP status codes for REST), it would be beneficial to clarify the error handling strategy for each supported transport to avoid potential confusion for developers using other protocols.
| <!-- Event replication across instances --> | ||
| <dependency> | ||
| <groupId>io.github.a2asdk</groupId> | ||
| <artifactId>a2a-java-queue-manager-replicated-core</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>io.github.a2asdk</groupId> | ||
| <artifactId>a2a-java-queue-manager-replication-mp-reactive</artifactId> | ||
| </dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The artifact IDs for the replicated queue manager modules (a2a-java-queue-manager-replicated-core and a2a-java-queue-manager-replication-mp-reactive) appear to be missing the extras prefix that is present in other modules in this directory (e.g., a2a-java-extras-task-store-database-jpa). For better consistency and discoverability, consider renaming these artifacts to include the extras prefix. This would make the naming convention for all extras modules uniform.
| <!-- Event replication across instances --> | |
| <dependency> | |
| <groupId>io.github.a2asdk</groupId> | |
| <artifactId>a2a-java-queue-manager-replicated-core</artifactId> | |
| </dependency> | |
| <dependency> | |
| <groupId>io.github.a2asdk</groupId> | |
| <artifactId>a2a-java-queue-manager-replication-mp-reactive</artifactId> | |
| </dependency> | |
| <!-- Event replication across instances --> | |
| <dependency> | |
| <groupId>io.github.a2asdk</groupId> | |
| <artifactId>a2a-java-extras-queue-manager-replicated-core</artifactId> | |
| </dependency> | |
| <dependency> | |
| <groupId>io.github.a2asdk</groupId> | |
| <artifactId>a2a-java-extras-queue-manager-replication-mp-reactive</artifactId> | |
| </dependency> |
jmesnil
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a big agent user so take everything I commented with a grain of salt.
But this file looks like a SNAPSHOT of the content of this repo at this current time instead of explanation of what is the intent of that repo
AGENTS.md
Outdated
| **A2A Java SDK** is a comprehensive Java implementation of the [Agent2Agent (A2A) Protocol](https://a2a-protocol.org/), enabling Java applications to run as A2A servers and communicate with other A2A agents. | ||
|
|
||
| - **Language**: Java 17+ | ||
| - **Build Tool**: Maven |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maven 3.x maybe?
|
|
||
| - **Language**: Java 17+ | ||
| - **Build Tool**: Maven | ||
| - **Primary Framework**: Quarkus (for reference implementations) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should instead state that the SDK is framework agnostic and provides a reference server based on Quarkus.
We don't want AI to bring Quarkus code in the core of the SDK
| - **License**: Apache 2.0 | ||
| - **Repository**: https://github.com/a2aproject/a2a-java | ||
|
|
||
| ## Quick Start Guide |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is that required in the AGENTS.md? It seems to be user doc (that should be in the README)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Claude seemed to think so
|
|
||
| ## Architecture | ||
|
|
||
| ### Multi-Module Maven Project Structure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this file should contain a snapshot of the layout. The AI can figure it out.
It'd be better to state that the project uses a multi-module mven project structure and separates its different components based on their targets (server-side, client-side), transport and goals (eg reference server for tck)
5965296 to
83e1b22
Compare
…ect#584) Introduce ServiceLoader-based A2AHttpClient client architecture with two implementations: - JDK HttpClient (core, always available) - Vert.x WebClient (optional, high-performance) Changes: - Create http-client-vertx module for Vert.x implementation - Add ServiceLoader infrastructure (A2AHttpClientFactory, providers) - Update dependent modules to use Vert.x client by default - Add comprehensive tests and usage examples Users can choose implementation via Maven dependencies. Priority-based selection: Vert.x (100) > JDK (0). Fixes a2aproject#583 🦕 Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
Provides examples and guidelines for AI-assisted coding.
Fixes #595 🦕