AS AgentScopeAPI 手册 / API Reference

Builder

public static class Builder
源码Source io/agentscope/core/tool/subagent/SubAgentConfig.java:153–241

SubAgentConfig的构建器。位于 io.agentscope.core.tool.subagent 包。核心成员包括 toolName、description、forwardEvents、streamOptions、stateStore、build。

Builder for SubAgentConfig.

方法摘要Method Summary

方法Method说明Description
public Builder toolName(String toolName)
设置工具名称。
Sets the tool name.
public Builder description(String description)
设置该配置项。
Sets the tool description.
public Builder forwardEvents(boolean forwardEvents)
设置该配置项。
Sets whether to forward sub-agent events to the parent agent.
public Builder streamOptions(StreamOptions streamOptions)
设置流选项。
Sets the stream options for event forwarding.
public Builder stateStore(AgentStateStore stateStore)
设置会话用于会话状态管理。
Sets the session for conversation state management.
public SubAgentConfig build()
构建配置。
Builds the configuration.

方法详情Method Detail

toolName

public Builder toolName(String toolName)

设置工具名称。

Sets the tool name.

参数Parameters
名称Name类型Type说明Description
toolNameString工具名称。The tool name
返回Returns Builder
返回当前实例,以支持链式调用。This builder
源码Source io/agentscope/core/tool/subagent/SubAgentConfig.java:170–173

description

public Builder description(String description)

设置该配置项。

Sets the tool description.

参数Parameters
名称Name类型Type说明Description
descriptionString描述(类型 `String`)。The description
返回Returns Builder
返回当前实例,以支持链式调用。This builder
源码Source io/agentscope/core/tool/subagent/SubAgentConfig.java:183–186

forwardEvents

public Builder forwardEvents(boolean forwardEvents)

设置该配置项。

Sets whether to forward sub-agent events to the parent agent.

参数Parameters
名称Name类型Type说明Description
forwardEventsbooleanforward 事件(类型 `boolean`)。true to forward events (default: true)
返回Returns Builder
返回当前实例,以支持链式调用。This builder
源码Source io/agentscope/core/tool/subagent/SubAgentConfig.java:197–200

streamOptions

public Builder streamOptions(StreamOptions streamOptions)

设置流选项。

Sets the stream options for event forwarding.

参数Parameters
名称Name类型Type说明Description
streamOptionsStreamOptions流选项(类型 `StreamOptions`)。The stream options (null for defaults)
返回Returns Builder
返回当前实例,以支持链式调用。This builder
源码Source io/agentscope/core/tool/subagent/SubAgentConfig.java:211–214

stateStore

public Builder stateStore(AgentStateStore stateStore)

设置会话用于会话状态管理。

Sets the session for conversation state management.

参数Parameters
名称Name类型Type说明Description
stateStoreAgentStateStore状态存储实例。The state store instance
返回Returns Builder
返回当前实例,以支持链式调用。This builder
源码Source io/agentscope/core/tool/subagent/SubAgentConfig.java:228–231

build

public SubAgentConfig build()

构建配置。

Builds the configuration.

返回Returns SubAgentConfig
返回SubAgentConfig。New SubAgentConfig instance
源码Source io/agentscope/core/tool/subagent/SubAgentConfig.java:238–240
基于官方固定版本源码静态生成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.