AS AgentScopeAPI 手册 / API Reference

LocalSnapshotSpec

public class LocalSnapshotSpec implements SandboxSnapshotSpec
源码Source io/agentscope/harness/agent/sandbox/snapshot/LocalSnapshotSpec.java:25–65

本地快照规格,承载智能体的部署、调度与服务化运行。位于 io.agentscope.harness.agent.sandbox.snapshot 包,实现 SandboxSnapshotSpec。核心成员包括 build、getBasePath、LocalSnapshotSpec。

Snapshot spec that creates LocalSandboxSnapshot instances stored in a local directory.

Each session gets its own snapshot file at {basePath}/{sessionId}.tar.

构造器摘要Constructor Summary

构造器Constructor说明Description
public LocalSnapshotSpec(Path basePath)
创建本地快照规格。
Creates a local snapshot spec.
public LocalSnapshotSpec(String basePath)
创建本地快照规格。
Creates a local snapshot spec.

方法摘要Method Summary

方法Method说明Description
public SandboxSnapshot build(String snapshotId)
构建并返回最终实例。
{@inheritDoc}
public String getBasePath()
获取基类路径。
Returns the base directory used for snapshot files.

构造器详情Constructor Detail

LocalSnapshotSpec

public LocalSnapshotSpec(Path basePath)

创建本地快照规格。

Creates a local snapshot spec.

参数Parameters
名称Name类型Type说明Description
basePathPath基类路径(类型 `Path`)。directory where snapshot tar files will be stored
源码Source io/agentscope/harness/agent/sandbox/snapshot/LocalSnapshotSpec.java:34–36

LocalSnapshotSpec

public LocalSnapshotSpec(String basePath)

创建本地快照规格。

Creates a local snapshot spec.

参数Parameters
名称Name类型Type说明Description
basePathString基类路径(类型 `String`)。directory path string where snapshot tar files will be stored
源码Source io/agentscope/harness/agent/sandbox/snapshot/LocalSnapshotSpec.java:43–45

方法详情Method Detail

build

public SandboxSnapshot build(String snapshotId)

构建并返回最终实例。

{@inheritDoc}

参数Parameters
名称Name类型Type说明Description
snapshotIdString快照标识(类型 `String`)。The snapshot id.
返回Returns SandboxSnapshot
返回SandboxSnapshot。a new `LocalSandboxSnapshot` storing at `{basePath}/{snapshotId}.tar`
源码Source io/agentscope/harness/agent/sandbox/snapshot/LocalSnapshotSpec.java:52–55

getBasePath

public String getBasePath()

获取基类路径。

Returns the base directory used for snapshot files.

返回Returns String
返回字符串结果。base path string
源码Source io/agentscope/harness/agent/sandbox/snapshot/LocalSnapshotSpec.java:62–64
基于官方固定版本源码静态生成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.