Skip to content

Conversation

TomorJM
Copy link
Contributor

@TomorJM TomorJM commented Sep 7, 2025

This commit introduces a new Spring Boot Starter module for the Agent Development Kit (ADK),
making it easier for developers to integrate ADK into Spring Boot applications.

Changes include:

  • Created new spring-boot-starter-adk module under contrib/
  • Added AdkSpringbootAutoConfiguration for automatic configuration
  • Implemented auto-configuration imports file for Spring Boot
  • Added dependencies on core ADK modules (google-adk, google-adk-dev)
  • Included test dependencies (spring-boot-starter-test, mockito-core)
  • Added integration tests for the starter
  • Made AgentStaticLoader public to enable external instantiation
  • Registered the new module in the parent pom.xml

The purpose of this starter is to activate the entire component functionality, enabling developers to use it out of the box.
But I'm not sure which functionalities should be placed in the starter. For example, whether it's necessary to provide annotation scanning or a class like AgentFactory, allowing developers to register their Agents as Beans. Whether such a design is needed requires further discussion.

@TomorJM TomorJM changed the title feat(spring-boot-starter-adk): Add Spring Boot Starter support and up… feat(spring-boot-starter-adk): Add Spring Boot Starter support Sep 7, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 @TomorJM, 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 usability of the Agent Development Kit (ADK) by introducing a dedicated Spring Boot Starter. This addition streamlines the process for developers to integrate and utilize ADK's functionalities within their Spring Boot applications, enabling out-of-the-box component activation and reducing manual configuration efforts.

Highlights

  • New Spring Boot Starter Module: A new module, spring-boot-starter-adk, has been introduced under contrib/ to simplify the integration of the Agent Development Kit (ADK) into Spring Boot applications.
  • Automatic Configuration: The AdkSpringbootAutoConfiguration class has been added to provide automatic configuration for ADK components within Spring Boot, along with the necessary auto-configuration imports file.
  • Dependency Management: The new starter module includes core ADK modules (google-adk, google-adk-dev) as dependencies, along with standard Spring Boot test dependencies (spring-boot-starter-test, mockito-core).
  • Integration Testing: Comprehensive integration tests have been added for the starter to ensure proper functionality and integration with Spring Boot's testing utilities.
  • API Visibility Enhancement: The AgentStaticLoader class has been made public to allow for external instantiation, supporting its use within the Spring Boot context.
  • Parent POM Integration: The new spring-boot-starter-adk module has been registered in the parent pom.xml, making it part of the main project build.
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 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

  1. 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.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 a Spring Boot starter for the Agent Development Kit (ADK), which is a valuable addition for simplifying integration with Spring Boot applications. The overall structure is good, but there is a critical issue in the auto-configuration implementation. The current @ComponentScan is too broad and will likely cause conflicts with a user's application. My review provides a suggestion to mitigate this. I have also included some recommendations to improve the pom.xml configuration and maintain code consistency in the test file.

<groupId>com.google.adk</groupId>
<artifactId>google-adk-dev</artifactId>
<version>${project.version}</version>
</dependency>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve the developer experience, it's a good practice for starters to include spring-boot-configuration-processor as an optional dependency. This enables IDEs to provide auto-completion and documentation for your custom configuration properties (like those defined for adk.web).

        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>

@TomorJM TomorJM force-pushed the github_dev.springboot_starter branch 2 times, most recently from 9977115 to 7f0229e Compare September 7, 2025 14:16
@TomorJM TomorJM force-pushed the github_dev.springboot_starter branch from 7f0229e to dcad622 Compare September 7, 2025 14:25
@TomorJM
Copy link
Contributor Author

TomorJM commented Sep 7, 2025

#181

@Poggecci
Copy link
Collaborator

Would you mind sharing a bit of the value prop of this starter (and why it should live under contrib/ as opposed to samples/? We'd recently improved the AdkWebServer to let you construct instances of it with your agents without going through dynamic agent loading (see here) to make it less tied to running through the dev package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants