adk-java icon indicating copy to clipboard operation
adk-java copied to clipboard

feat(spring-boot-starter-adk): Add Spring Boot Starter support

Open TomorJM opened this issue 1 year ago • 3 comments

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 avatar Sep 07 '25 14:09 TomorJM

#181

TomorJM avatar Sep 07 '25 14:09 TomorJM

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.

Poggecci avatar Sep 14 '25 18:09 Poggecci

Thank you for sending the PR!

I would suggest to focus on PR https://github.com/google/adk-java/pull/653 to avoid duplicate work

ddobrin avatar Mar 18 '26 19:03 ddobrin