AS AgentScopeAPI 手册 / API Reference

AgentscopeAutoConfiguration

@AutoConfiguration @EnableConfigurationProperties(AgentscopeProperties.class) @ConditionalOnClass(ReActAgent.class) public class AgentscopeAutoConfiguration
源码Source io/agentscope/spring/boot/AgentscopeAutoConfiguration.java:55–118

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

返回Returns Memory
返回记忆。Returns memory.
源码Source io/agentscope/spring/boot/AgentscopeAutoConfiguration.java:70–76

agentscopeToolkit

public Toolkit agentscopeToolkit()

返回 agentscopeToolkit 结果。

Default Toolkit implementation with an initially empty tool set.

返回Returns Toolkit
返回工具包。Returns toolkit.
源码Source io/agentscope/spring/boot/AgentscopeAutoConfiguration.java:88–94

agentscopeReActAgent

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.

参数Parameters
名称Name类型Type说明Description
modelModel模型实例(类型 `Model`)。The model.
memoryMemory记忆(类型 `Memory`)。The memory.
toolkitToolkit工具包(类型 `Toolkit`)。The toolkit.
propertiesAgentscopeProperties属性(类型 `AgentscopeProperties`)。The properties.
返回Returns ReActAgent
返回ReActAgent。Returns ReAct agent.
源码Source io/agentscope/spring/boot/AgentscopeAutoConfiguration.java:103–117
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.