AS AgentScopeAPI 手册 / API Reference

SandboxSnapshotSpec

public interface SandboxSnapshotSpec
源码Source io/agentscope/harness/agent/sandbox/snapshot/SandboxSnapshotSpec.java:28–37

定义沙箱快照规格契约的接口。位于 io.agentscope.harness.agent.sandbox.snapshot 包。核心成员包括 build。

Factory that creates SandboxSnapshot instances for a given session ID.

Implementations configure WHERE snapshots are stored: NoopSnapshotSpec (disabled), LocalSnapshotSpec (local disk), RemoteSnapshotSpec (remote storage).

The snapshotId parameter passed to #build allows each session to have its own isolated snapshot file/object, while sharing the same storage configuration.

方法摘要Method Summary

方法Method说明Description
public SandboxSnapshot build(String snapshotId)
构建并返回最终实例。
Creates a `SandboxSnapshot` for the given session ID.

方法详情Method Detail

build

public SandboxSnapshot build(String snapshotId)

构建并返回最终实例。

Creates a SandboxSnapshot for the given session ID.

参数Parameters
名称Name类型Type说明Description
snapshotIdString快照标识(类型 `String`)。unique identifier for the snapshot (typically the session UUID)
返回Returns SandboxSnapshot
返回SandboxSnapshot。a new snapshot instance configured for the given ID
源码Source io/agentscope/harness/agent/sandbox/snapshot/SandboxSnapshotSpec.java:36
基于官方固定版本源码静态生成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.