AS AgentScopeAPI 手册 / API Reference

AgentRunFilesystemSpec

public class AgentRunFilesystemSpec extends SandboxFilesystemSpec
源码Source io/agentscope/extensions/sandbox/agentrun/AgentRunFilesystemSpec.java:26–137

智能体运行文件系统规格,在隔离环境中安全执行代码和工具。位于 io.agentscope.extensions.sandbox.agentrun 包,继承自 SandboxFilesystemSpec。核心成员包括 client、apiKey、accountId、region、dataPlaneBaseUrl、templateName。

SandboxFilesystemSpec for the Alibaba Cloud AgentRun store.

方法摘要Method Summary

方法Method说明Description
public AgentRunFilesystemSpec client(SandboxClient<?> client)
设置客户端。
Performs the client operation.
public AgentRunFilesystemSpec apiKey(String apiKey)
设置API 键。
Performs the api key operation.
public AgentRunFilesystemSpec accountId(String accountId)
设置该参数。
Performs the account id operation.
public AgentRunFilesystemSpec region(String region)
设置区域。
Performs the region operation.
public AgentRunFilesystemSpec dataPlaneBaseUrl(String url)
设置数据面基类 URL。
Performs the data plane base url operation.
public AgentRunFilesystemSpec templateName(String templateName)
设置模板名称。
Performs the template name operation.
public AgentRunFilesystemSpec mcpServerUrl(String mcpServerUrl)
设置MCP 服务端 URL。
Performs the mcp server url operation.
public AgentRunFilesystemSpec mcpEndpoint(String mcpEndpoint)
设置MCP 端点。
Performs the mcp endpoint operation.
public AgentRunFilesystemSpec sandboxIdleTimeoutSeconds(int seconds)
设置该参数。
Performs the sandbox idle timeout seconds operation.
public AgentRunFilesystemSpec nasConfig(AgentRunNasMountConfig nas)
设置该参数。
Performs the nas config operation.
public AgentRunFilesystemSpec addOssMount(AgentRunOssMountConfig mount)
添加 `addOssMount`。
Adds the oss mount.
public AgentRunFilesystemSpec workspaceRoot(String workspaceRoot)
设置工作区根。
Performs the workspace root operation.
public AgentRunFilesystemSpec connectTimeoutSeconds(int seconds)
设置连接超时秒。
Performs the connect timeout seconds operation.
public AgentRunFilesystemSpec readTimeoutSeconds(int seconds)
设置读取超时秒。
Performs the read timeout seconds operation.
public AgentRunFilesystemSpec maxRetries(int maxRetries)
设置最大重试。
Performs the max retries operation.
public AgentRunFilesystemSpec snapshotSpec(SandboxSnapshotSpec snapshotSpec)
设置快照规格。
Performs the snapshot spec operation.
public AgentRunFilesystemSpec workspaceSpec(WorkspaceSpec workspaceSpec)
设置工作区规格。
Performs the workspace spec operation.
protected SandboxClient<?> createClient()
创建客户端。
Creates the client.
protected SandboxClientOptions clientOptions()
返回客户端选项。
Returns the client options.
protected SandboxSnapshotSpec snapshotSpec()
返回快照规格。
Returns the snapshot spec.
protected WorkspaceSpec workspaceSpec()
返回工作区规格。
Returns the workspace spec.

方法详情Method Detail

client

public AgentRunFilesystemSpec client(SandboxClient<?> client)

设置客户端。

Performs the client operation.

参数Parameters
名称Name类型Type说明Description
clientSandboxClient<?>客户端(类型 `SandboxClient`)。The client.
返回Returns AgentRunFilesystemSpec
返回AgentRunFilesystemSpec。Returns agent run filesystem spec.
源码Source io/agentscope/extensions/sandbox/agentrun/AgentRunFilesystemSpec.java:33–36

apiKey

public AgentRunFilesystemSpec apiKey(String apiKey)

设置API 键。

Performs the api key operation.

参数Parameters
名称Name类型Type说明Description
apiKeyStringAPI 键(类型 `String`)。The api key.
返回Returns AgentRunFilesystemSpec
返回AgentRunFilesystemSpec。Returns agent run filesystem spec.
源码Source io/agentscope/extensions/sandbox/agentrun/AgentRunFilesystemSpec.java:38–41

accountId

public AgentRunFilesystemSpec accountId(String accountId)

设置该参数。

Performs the account id operation.

参数Parameters
名称Name类型Type说明Description
accountIdStringaccount 标识(类型 `String`)。The account id.
返回Returns AgentRunFilesystemSpec
返回AgentRunFilesystemSpec。Returns agent run filesystem spec.
源码Source io/agentscope/extensions/sandbox/agentrun/AgentRunFilesystemSpec.java:43–46

region

public AgentRunFilesystemSpec region(String region)

设置区域。

Performs the region operation.

参数Parameters
名称Name类型Type说明Description
regionString区域(类型 `String`)。The region.
返回Returns AgentRunFilesystemSpec
返回AgentRunFilesystemSpec。Returns agent run filesystem spec.
源码Source io/agentscope/extensions/sandbox/agentrun/AgentRunFilesystemSpec.java:48–51

dataPlaneBaseUrl

public AgentRunFilesystemSpec dataPlaneBaseUrl(String url)

设置数据面基类 URL。

Performs the data plane base url operation.

参数Parameters
名称Name类型Type说明Description
urlString服务地址(类型 `String`)。The url.
返回Returns AgentRunFilesystemSpec
返回AgentRunFilesystemSpec。Returns agent run filesystem spec.
源码Source io/agentscope/extensions/sandbox/agentrun/AgentRunFilesystemSpec.java:53–56

templateName

public AgentRunFilesystemSpec templateName(String templateName)

设置模板名称。

Performs the template name operation.

参数Parameters
名称Name类型Type说明Description
templateNameString模板名称(类型 `String`)。The template name.
返回Returns AgentRunFilesystemSpec
返回AgentRunFilesystemSpec。Returns agent run filesystem spec.
源码Source io/agentscope/extensions/sandbox/agentrun/AgentRunFilesystemSpec.java:58–61

mcpServerUrl

public AgentRunFilesystemSpec mcpServerUrl(String mcpServerUrl)

设置MCP 服务端 URL。

Performs the mcp server url operation.

参数Parameters
名称Name类型Type说明Description
mcpServerUrlStringMCP 服务端 URL(类型 `String`)。The mcp server url.
返回Returns AgentRunFilesystemSpec
返回AgentRunFilesystemSpec。Returns agent run filesystem spec.
源码Source io/agentscope/extensions/sandbox/agentrun/AgentRunFilesystemSpec.java:63–66

mcpEndpoint

public AgentRunFilesystemSpec mcpEndpoint(String mcpEndpoint)

设置MCP 端点。

Performs the mcp endpoint operation.

参数Parameters
名称Name类型Type说明Description
mcpEndpointStringMCP 端点(类型 `String`)。The mcp endpoint.
返回Returns AgentRunFilesystemSpec
返回AgentRunFilesystemSpec。Returns agent run filesystem spec.
源码Source io/agentscope/extensions/sandbox/agentrun/AgentRunFilesystemSpec.java:68–71

sandboxIdleTimeoutSeconds

public AgentRunFilesystemSpec sandboxIdleTimeoutSeconds(int seconds)

设置该参数。

Performs the sandbox idle timeout seconds operation.

参数Parameters
名称Name类型Type说明Description
secondsint秒(类型 `int`)。The seconds.
返回Returns AgentRunFilesystemSpec
返回AgentRunFilesystemSpec。Returns agent run filesystem spec.
源码Source io/agentscope/extensions/sandbox/agentrun/AgentRunFilesystemSpec.java:73–76

nasConfig

public AgentRunFilesystemSpec nasConfig(AgentRunNasMountConfig nas)

设置该参数。

Performs the nas config operation.

参数Parameters
名称Name类型Type说明Description
nasAgentRunNasMountConfignas(类型 `AgentRunNasMountConfig`)。The nas.
返回Returns AgentRunFilesystemSpec
返回AgentRunFilesystemSpec。Returns agent run filesystem spec.
源码Source io/agentscope/extensions/sandbox/agentrun/AgentRunFilesystemSpec.java:78–81

addOssMount

public AgentRunFilesystemSpec addOssMount(AgentRunOssMountConfig mount)

添加 addOssMount。

Adds the oss mount.

参数Parameters
名称Name类型Type说明Description
mountAgentRunOssMountConfigmount(类型 `AgentRunOssMountConfig`)。The mount.
返回Returns AgentRunFilesystemSpec
返回AgentRunFilesystemSpec。Returns agent run filesystem spec.
源码Source io/agentscope/extensions/sandbox/agentrun/AgentRunFilesystemSpec.java:83–86

workspaceRoot

public AgentRunFilesystemSpec workspaceRoot(String workspaceRoot)

设置工作区根。

Performs the workspace root operation.

参数Parameters
名称Name类型Type说明Description
workspaceRootString工作区根(类型 `String`)。The workspace root.
返回Returns AgentRunFilesystemSpec
返回AgentRunFilesystemSpec。Returns agent run filesystem spec.
源码Source io/agentscope/extensions/sandbox/agentrun/AgentRunFilesystemSpec.java:88–91

connectTimeoutSeconds

public AgentRunFilesystemSpec connectTimeoutSeconds(int seconds)

设置连接超时秒。

Performs the connect timeout seconds operation.

参数Parameters
名称Name类型Type说明Description
secondsint秒(类型 `int`)。The seconds.
返回Returns AgentRunFilesystemSpec
返回AgentRunFilesystemSpec。Returns agent run filesystem spec.
源码Source io/agentscope/extensions/sandbox/agentrun/AgentRunFilesystemSpec.java:93–96

readTimeoutSeconds

public AgentRunFilesystemSpec readTimeoutSeconds(int seconds)

设置读取超时秒。

Performs the read timeout seconds operation.

参数Parameters
名称Name类型Type说明Description
secondsint秒(类型 `int`)。The seconds.
返回Returns AgentRunFilesystemSpec
返回AgentRunFilesystemSpec。Returns agent run filesystem spec.
源码Source io/agentscope/extensions/sandbox/agentrun/AgentRunFilesystemSpec.java:98–101

maxRetries

public AgentRunFilesystemSpec maxRetries(int maxRetries)

设置最大重试。

Performs the max retries operation.

参数Parameters
名称Name类型Type说明Description
maxRetriesint最大重试(类型 `int`)。The max retries.
返回Returns AgentRunFilesystemSpec
返回AgentRunFilesystemSpec。Returns agent run filesystem spec.
源码Source io/agentscope/extensions/sandbox/agentrun/AgentRunFilesystemSpec.java:103–106

snapshotSpec

public AgentRunFilesystemSpec snapshotSpec(SandboxSnapshotSpec snapshotSpec)

设置快照规格。

Performs the snapshot spec operation.

参数Parameters
名称Name类型Type说明Description
snapshotSpecSandboxSnapshotSpec快照规格(类型 `SandboxSnapshotSpec`)。The snapshot spec.
返回Returns AgentRunFilesystemSpec
返回AgentRunFilesystemSpec。Returns agent run filesystem spec.
源码Source io/agentscope/extensions/sandbox/agentrun/AgentRunFilesystemSpec.java:108–111

workspaceSpec

public AgentRunFilesystemSpec workspaceSpec(WorkspaceSpec workspaceSpec)

设置工作区规格。

Performs the workspace spec operation.

参数Parameters
名称Name类型Type说明Description
workspaceSpecWorkspaceSpec工作区规格(类型 `WorkspaceSpec`)。The workspace spec.
返回Returns AgentRunFilesystemSpec
返回AgentRunFilesystemSpec。Returns agent run filesystem spec.
源码Source io/agentscope/extensions/sandbox/agentrun/AgentRunFilesystemSpec.java:113–116

createClient

protected SandboxClient<?> createClient()

创建客户端。

Creates the client.

返回Returns SandboxClient<?>
返回SandboxClient。Returns sandbox client.
源码Source io/agentscope/extensions/sandbox/agentrun/AgentRunFilesystemSpec.java:118–121

clientOptions

protected SandboxClientOptions clientOptions()

返回客户端选项。

Returns the client options.

返回Returns SandboxClientOptions
返回SandboxClientOptions。Returns sandbox client options.
源码Source io/agentscope/extensions/sandbox/agentrun/AgentRunFilesystemSpec.java:123–126

snapshotSpec

protected SandboxSnapshotSpec snapshotSpec()

返回快照规格。

Returns the snapshot spec.

返回Returns SandboxSnapshotSpec
返回SandboxSnapshotSpec。Returns sandbox snapshot spec.
源码Source io/agentscope/extensions/sandbox/agentrun/AgentRunFilesystemSpec.java:128–131

workspaceSpec

protected WorkspaceSpec workspaceSpec()

返回工作区规格。

Returns the workspace spec.

返回Returns WorkspaceSpec
返回WorkspaceSpec。Returns workspace spec.
源码Source io/agentscope/extensions/sandbox/agentrun/AgentRunFilesystemSpec.java:133–136

继承成员Inherited Members

基于官方固定版本源码静态生成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.