AgentscopeAutoConfiguration
@AutoConfiguration @EnableConfigurationProperties(AgentscopeProperties.class) @ConditionalOnClass(ReActAgent.class) public class AgentscopeAutoConfiguration
io/agentscope/spring/boot/AgentscopeAutoConfiguration.java:55–118Agentscope Auto 配置,保存相关配置项。位于 io.agentscope.spring.boot 包。核心成员包括 agentscopeMemory、agentscopeToolkit、agentscopeReActAgent。
Spring Boot auto-configuration that exposes default Memory, Toolkit and ReActAgent beans for AgentScope.
Model beans are provided by provider-specific starters such as
agentscope-dashscope-spring-boot-starter, agentscope-openai-spring-boot-starter,
agentscope-gemini-spring-boot-starter, agentscope-anthropic-spring-boot-starter,
or by user-defined Model beans.
Basic configuration:
`agentscope:
agent:
enabled: true
name: "Assistant"
sys-prompt: "You are a helpful AI assistant."
max-iters: 10
`
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Memory agentscopeMemory() | 返回 `agentscopeMemory` 结果。 Default Memory implementation backed by InMemoryMemory. |
public Toolkit agentscopeToolkit() | 返回 `agentscopeToolkit` 结果。 Default Toolkit implementation with an initially empty tool set. |
public ReActAgent agentscopeReActAgent(Model model, Memory memory, Toolkit toolkit, AgentscopeProperties properties) | 执行 `agentscopeReActAgent` 方法。 Default ReActAgent that wires together the configured Model, Memory and
Toolkit beans using
`AgentProperties`. |
方法详情Method Detail
agentscopeMemory
public Memory agentscopeMemory()
返回 agentscopeMemory 结果。
Default Memory implementation backed by InMemoryMemory.
Memoryio/agentscope/spring/boot/AgentscopeAutoConfiguration.java:70–76agentscopeToolkit
public Toolkit agentscopeToolkit()
返回 agentscopeToolkit 结果。
Default Toolkit implementation with an initially empty tool set.
Toolkitio/agentscope/spring/boot/AgentscopeAutoConfiguration.java:88–94agentscopeReActAgent
public ReActAgent agentscopeReActAgent(Model model, Memory memory, Toolkit toolkit, AgentscopeProperties properties)
执行 agentscopeReActAgent 方法。
Default ReActAgent that wires together the configured Model, Memory and Toolkit beans using AgentProperties.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
model | Model | 模型实例(类型 `Model`)。The model. |
memory | Memory | 记忆(类型 `Memory`)。The memory. |
toolkit | Toolkit | 工具包(类型 `Toolkit`)。The toolkit. |
properties | AgentscopeProperties | 属性(类型 `AgentscopeProperties`)。The properties. |
ReActAgentio/agentscope/spring/boot/AgentscopeAutoConfiguration.java:103–117