AS AgentScopeAPI 手册 / API Reference

Builder

public static class Builder
源码Source io/agentscope/runtime/sandbox/manager/ManagerConfig.java:78–127

构建器,用于构建并配置目标实例。位于 io.agentscope.runtime.sandbox.manager 包。核心成员包括 containerPrefixKey、portRange、clientStarter、sandboxMap、baseUrl、bearerToken。

A class in io.agentscope.runtime.sandbox.manager that deploys, schedules and serves agents. Declared in io.agentscope.runtime.sandbox.manager.

方法摘要Method Summary

方法Method说明Description
public Builder containerPrefixKey(String containerPrefixKey)
设置该配置项。
Performs the container prefix key operation.
public Builder portRange(PortRange portRange)
设置该配置项。
Performs the port range operation.
public Builder clientStarter(BaseClientStarter clientStarter)
设置客户端启动器。
Performs the client starter operation.
public Builder sandboxMap(SandboxMap sandboxMap)
设置沙箱映射。
Performs the sandbox map operation.
public Builder baseUrl(String baseUrl)
设置基类 URL。
Performs the base url operation.
public Builder bearerToken(String bearerToken)
设置该配置项。
Performs the bearer token operation.
public Builder agentBayApiKey(String agentBayApiKey)
设置该配置项。
Performs the agent bay api key operation.
public ManagerConfig build()
构建并返回最终实例。
Creates and returns an instance.

方法详情Method Detail

containerPrefixKey

public Builder containerPrefixKey(String containerPrefixKey)

设置该配置项。

Performs the container prefix key operation.

参数Parameters
名称Name类型Type说明Description
containerPrefixKeyString容器 Prefix 键(类型 `String`)。The container prefix key.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/ManagerConfig.java:89–92

portRange

public Builder portRange(PortRange portRange)

设置该配置项。

Performs the port range operation.

参数Parameters
名称Name类型Type说明Description
portRangePortRangeport Range(类型 `PortRange`)。The port range.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/ManagerConfig.java:94–97

clientStarter

public Builder clientStarter(BaseClientStarter clientStarter)

设置客户端启动器。

Performs the client starter operation.

参数Parameters
名称Name类型Type说明Description
clientStarterBaseClientStarter客户端启动器(类型 `BaseClientStarter`)。The client starter.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/ManagerConfig.java:99–102

sandboxMap

public Builder sandboxMap(SandboxMap sandboxMap)

设置沙箱映射。

Performs the sandbox map operation.

参数Parameters
名称Name类型Type说明Description
sandboxMapSandboxMap沙箱映射(类型 `SandboxMap`)。The sandbox map.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/ManagerConfig.java:104–107

baseUrl

public Builder baseUrl(String baseUrl)

设置基类 URL。

Performs the base url operation.

参数Parameters
名称Name类型Type说明Description
baseUrlString基类 URL(类型 `String`)。The base url.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/ManagerConfig.java:109–112

bearerToken

public Builder bearerToken(String bearerToken)

设置该配置项。

Performs the bearer token operation.

参数Parameters
名称Name类型Type说明Description
bearerTokenStringbearer 令牌(类型 `String`)。The bearer token.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/ManagerConfig.java:114–117

agentBayApiKey

public Builder agentBayApiKey(String agentBayApiKey)

设置该配置项。

Performs the agent bay api key operation.

参数Parameters
名称Name类型Type说明Description
agentBayApiKeyString智能体 Bay API 键(类型 `String`)。The agent bay api key.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/ManagerConfig.java:119–122

build

public ManagerConfig build()

构建并返回最终实例。

Creates and returns an instance.

返回Returns ManagerConfig
返回ManagerConfig。Returns manager config.
源码Source io/agentscope/runtime/sandbox/manager/ManagerConfig.java:124–126
基于官方固定版本源码静态生成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.