Skip to content

feat(starter): Spring Boot Starter Integration#168

Merged
AlbumenJ merged 3 commits intoagentscope-ai:mainfrom
jianjun159:spring-boot-starter
Dec 11, 2025
Merged

feat(starter): Spring Boot Starter Integration#168
AlbumenJ merged 3 commits intoagentscope-ai:mainfrom
jianjun159:spring-boot-starter

Conversation

@jianjun159
Copy link
Contributor

@jianjun159 jianjun159 commented Dec 9, 2025

AgentScope-Java Version

[The version of AgentScope-Java you are working on, e.g. 1.0.1, check your pom.xml dependency version or run mvn dependency:tree | grep agentscope-parent:pom(only mac/linux)]

1.0.2-SNAPSHOT

Description

Background

This PR is mainly for adding Spring Boot Starter #147

Purpose

To enable SpringBoot applications to quickly integrate AgentScope, the content of this PR is as follows:

  1. Add Model automatic injection and support the configuration of Providers to achieve rapid integration of different models
  2. Add automatic injection of ReActAgent

Configuration example

agentscope:
  # Select model provider (defaults to dashscope when omitted)
  model:
    provider: dashscope

  dashscope:
    enabled: true
    api-key: ${DASHSCOPE_API_KEY}
    model-name: qwen-plus
    stream: true
    enable-thinking: true

  agent:
    enabled: true
    name: "Assistant"
    sys-prompt: "You are a helpful AI assistant."
    max-iters: 10

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

@jianjun159 jianjun159 requested a review from a team December 9, 2025 12:00
name = "enabled",
havingValue = "true",
matchIfMissing = true)
public ReActAgent agentscopeReActAgent(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please note that ReActAgent is not thread-safe. Therefore, we may need to use an ObjectProvider.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Toolkit is also not thread-safe

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, it was my lack of consideration. I have already made some optimizations to the code

pom.xml Outdated
<module>agentscope-dependencies-bom</module>
<module>agentscope-extensions</module>
<module>agentscope-distribution</module>
<module>agentscope-spring-boot-starter</module>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
<module>agentscope-spring-boot-starter</module>
<module>agentscope-spring-boot-starters</module>

Then use agentscope-spring-boot-starter for this PR

We will add some agentscope-{components}-spring-boot-starter in the future

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I have added the Spring Boot Starters module and moved the existing Spring Boot Starter module to Starters

Copy link
Collaborator

@AlbumenJ AlbumenJ left a comment

Choose a reason for hiding this comment

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

LGTM

@AlbumenJ AlbumenJ merged commit 72ee62f into agentscope-ai:main Dec 11, 2025
4 checks passed
JGoP-L pushed a commit to JGoP-L/agentscope-java that referenced this pull request Dec 29, 2025
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