Skip to content

feat(agui): Improve agui spring boot auto-configuration#653

Merged
AlbumenJ merged 1 commit intoagentscope-ai:mainfrom
guanxuc:agui-starter-improve
Jan 26, 2026
Merged

feat(agui): Improve agui spring boot auto-configuration#653
AlbumenJ merged 1 commit intoagentscope-ai:mainfrom
guanxuc:agui-starter-improve

Conversation

@guanxuc
Copy link
Contributor

@guanxuc guanxuc commented Jan 24, 2026

AgentScope-Java Version

1.0.8

Description

  • Introduce AguiAgentRegistryCustomizer to customize agent registry.
  • Introduce AguiAgentRegistryAutoConfiguration for the auto-configure of agent registry and agent auto registration.

Checklist

Please check the following items before code is ready to be reviewed.

  • Code has been formatted with mvn spotless:apply
  • All tests are passing (mvn test)
  • Javadoc comments are complete and follow project conventions
  • Related documentation has been updated (e.g. links, examples, etc.)
  • Code is ready for review

@guanxuc guanxuc requested a review from a team January 24, 2026 15:45
@gemini-code-assist
Copy link

Summary of Changes

Hello @guanxuc, 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 improves the Spring Boot auto-configuration for AG-UI by introducing a more structured and extensible approach to managing agent registries and agent auto-registration. The changes decouple the agent registration logic, allowing for clearer customization through a new functional interface and centralizing the auto-configuration process. This refactoring enhances the maintainability and flexibility of integrating AG-UI agents into Spring Boot applications, making it easier for developers to define and register their agents.

Highlights

  • Enhanced Agent Registry Customization: Introduced the AguiAgentRegistryCustomizer interface, allowing developers to programmatically customize the AguiAgentRegistry by registering agents using a functional approach, providing greater flexibility than previous methods.
  • Dedicated Auto-Configuration for Agent Registry: A new AguiAgentRegistryAutoConfiguration class has been added. This class centralizes the auto-configuration of the AguiAgentRegistry and the AguiAgentAutoRegistration process, ensuring a more modular and standard Spring Boot integration.
  • Refactored Agent Auto-Registration: The AguiAgentAutoRegistration class has been refactored from an auto-configuration to a scanner class. It now implements InitializingBean and is managed by the new AguiAgentRegistryAutoConfiguration, improving its lifecycle management within the Spring context.
  • Updated Documentation and Examples: The documentation (both English and Chinese) and example configurations have been updated to reflect the new methods for registering agents, including the use of the AguiAgentRegistryCustomizer and annotation-driven registration.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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

@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 significantly improves the agui-spring-boot-starter by introducing a more idiomatic Spring Boot auto-configuration approach. The new AguiAgentRegistryAutoConfiguration centralizes bean creation, and the AguiAgentRegistryCustomizer provides a clean extension point for users to register their agents. The refactoring of AguiAgentAutoRegistration and the updates to MVC/WebFlux configurations are well-executed. The addition of comprehensive unit tests and documentation updates are also great.

I have a few suggestions to further improve the code's clarity and maintainability, primarily around simplifying the new AguiAgentRegistryCustomizer interface and refining the example configuration. Overall, this is a high-quality contribution that makes the starter more robust and easier to use.

@guanxuc guanxuc force-pushed the agui-starter-improve branch from 63656cb to 9715519 Compare January 24, 2026 16:24
@codecov
Copy link

codecov bot commented Jan 24, 2026

Codecov Report

❌ Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ng/boot/agui/common/AguiAgentAutoRegistration.java 83.33% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@AlbumenJ AlbumenJ merged commit 67f19a9 into agentscope-ai:main Jan 26, 2026
5 checks passed
@guanxuc guanxuc deleted the agui-starter-improve branch January 26, 2026 02:27
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