-
Notifications
You must be signed in to change notification settings - Fork 104
feat: support springboot integrated and example #147
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
Conversation
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.
Summary of Changes
Hello @tomsun28, 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 significantly enhances the A2A Java SDK by introducing first-class support for Spring Boot. It provides a dedicated Spring Boot adapter module with auto-configuration capabilities and a new example application, making it much easier for developers to integrate A2A agents into their Spring Boot projects. The changes streamline the setup process and expose A2A protocol endpoints through a standard Spring web controller, aligning with common Java enterprise development practices.
Highlights
- New Spring Boot Integration Module: Introduced a new Maven module
sdk-spring(artifacta2a-java-sdk-server-spring) to provide a Spring Boot adapter for the A2A protocol, enabling seamless integration of A2A server functionality into Spring Boot applications. - Spring Boot Auto-Configuration: Added
A2ASpringAutoConfigurationto automatically configure necessary A2A server beans (likeAgentCard,TaskStore,QueueManager,PushNotifier,RequestHandler, andJSONRPCHandler) based on Spring Boot properties, simplifying setup and reducing boilerplate. - Externalized Configuration: Implemented
A2AServerPropertiesto allow comprehensive configuration of A2A agent metadata, capabilities, and server settings viaapplication.ymlorapplication.properties, providing a familiar Spring-style configuration experience. - New Spring Boot Example Application: Included a new
spring-helloworldexample application demonstrating how to set up a basic A2A agent using the new Spring Boot integration, complete with its ownpom.xml, main application class, A2A server configuration, and a REST controller for A2A endpoints. - A2A Protocol Endpoints: The
A2AServerControllerexposes standard A2A JSON-RPC endpoints for both non-streaming and streaming requests (using Server-Sent Events), as well as dedicated endpoints for retrieving the Agent Card (/.well-known/agent.json) and authenticated extended Agent Card (/agent/authenticatedExtendedCard). - Comprehensive Documentation: A detailed
README.mdfor the newsdk-springmodule has been added, outlining its features, dependencies, a quick start guide, endpoint descriptions, streaming response handling, exception handling, and configuration options.
Using Gemini Code Assist
The 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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and 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 to provide feedback.
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
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
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 Spring Boot integration for the A2A Java SDK. The changes include a new Spring Boot starter module, auto-configuration, and a helloworld example application.
My review focuses on improving the clarity and correctness of the example application and its documentation. I've identified a critical issue with a non-existent Spring Boot version in the example's pom.xml and a configuration mismatch in its application.yml. I've also suggested improvements to error handling and refactoring opportunities.
...ples/spring-helloworld/src/main/java/io/a2a/sdk/apps/spring/demo/config/A2AServerConfig.java
Outdated
Show resolved
Hide resolved
...pring-helloworld/src/main/java/io/a2a/sdk/apps/spring/demo/endpoint/A2AServerController.java
Show resolved
Hide resolved
...pring-helloworld/src/main/java/io/a2a/sdk/apps/spring/demo/endpoint/A2AServerController.java
Show resolved
Hide resolved
...ples/spring-helloworld/src/main/java/io/a2a/sdk/apps/spring/demo/config/A2AServerConfig.java
Show resolved
Hide resolved
...pring-helloworld/src/main/java/io/a2a/sdk/apps/spring/demo/endpoint/A2AServerController.java
Show resolved
Hide resolved
sdk-spring/src/main/java/io/a2a/server/apps/spring/A2AServerProperties.java
Show resolved
Hide resolved
|
Hi @tomsun28 After some discussion, we decided to only put the reference implementation in this repo (so we have something to test against), and to keep integrations with various frameworks in their own repositories. Otherwise we risk ending up maintaining too many things which we don't know much about :-) See #178 for more information. What used to be called sdk-jakarta in this repository now lives here. https://github.com/wildfly-extras/a2a-java-sdk-server-jakarta. This isn't totally ready yet, I have some WIP in https://github.com/wildfly-extras/a2a-java-sdk-server-jakarta/compare/main...kabir:multi-module?expand=1. And until I get this cleaned up, working with the TCK etc. it is still a bit early to point you to this as an example to follow. Sorry for the inconvenience, but I hope to have something in the next day or two. |
|
Hi @kabir Thanks for your reponse,
Perhaps we can also trust the power of community — many are willing to contribute. Also I do understand your considerations and decision. It might be helpful to include links to other external integrations in the README later on, so users can more easily find and adopt them. |
|
Hi, this is still kind of an early draft but here is the current plan https://github.com/a2aproject/a2a-java/blob/main/CONTRIBUTING_INTEGRATIONS.md Integrations are currently listed at https://github.com/a2aproject/a2a-java/blob/main/README.md#server-integrations. Once we have s few more, we'll figure out a better way to present and announce these :-) |
|
@tomsun28 I've already merged a fair bit of the Jakarta SDK work, and the remainder is in here wildfly-extras/a2a-java-sdk-server-jakarta#5. Tomorrow (probably) I will add better documentation. Hopefully this serves as a good example for you. |
|
@tomsun28 Thanks for working on this! Just wondering if it would make sense to close this PR now since integrations should be provided in other repos? |

Description
feat: support springboot integrated and example
CONTRIBUTINGGuide.fix:which represents bug fixes, and correlates to a SemVer patch.feat:represents a new feature, and correlates to a SemVer minor.feat!:, orfix!:,refactor!:, etc., which represent a breaking change (indicated by the!) and will result in a SemVer major.Fixes #<issue_number_goes_here> 🦕