AS AgentScopeAPI 手册 / API Reference

OssDistributedStore

public class OssDistributedStore implements DistributedStore
源码Source io/agentscope/extensions/oss/OssDistributedStore.java:39–85

OSS 分布式存储,负责持久化与读取数据。位于 io.agentscope.extensions.oss 包,实现 DistributedStore。核心成员包括 create、agentStateStore、baseStore、sandboxSnapshotSpec。

Alibaba Cloud OSS-backed DistributedStore.

Usage:

`OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);

HarnessAgent agent = HarnessAgent.builder()
.name("my-agent")
.model("dashscope:qwen-plus")
.distributedStore(OssDistributedStore.create(ossClient, "my-bucket", "agentscope/"))
.build();
`

方法摘要Method Summary

方法Method说明Description
public static OssDistributedStore create(OSS ossClient, String bucketName, String keyPrefix)
static
创建OSS 分布式存储。
Creates an OSS distributed store.
public AgentStateStore agentStateStore()
返回智能体状态存储。
Returns the agent state store.
public BaseStore baseStore()
返回基类存储。
Returns the base store.
public SandboxSnapshotSpec sandboxSnapshotSpec()
返回沙箱快照规格。
Returns the sandbox snapshot spec.

方法详情Method Detail

create

public static OssDistributedStore create(OSS ossClient, String bucketName, String keyPrefix)
static

创建OSS 分布式存储。

Creates an OSS distributed store.

参数Parameters
名称Name类型Type说明Description
ossClientOSSOSS 客户端(类型 `OSS`)。initialized OSS client
bucketNameString存储桶名称(类型 `String`)。target bucket name
keyPrefixString键 Prefix(类型 `String`)。object key prefix (e.g. `"agentscope/"`)
返回Returns OssDistributedStore
一种新的OSS 分布式存储。a new OSS distributed store
源码Source io/agentscope/extensions/oss/OssDistributedStore.java:59–61

agentStateStore

public AgentStateStore agentStateStore()

返回智能体状态存储。

Returns the agent state store.

返回Returns AgentStateStore
返回AgentStateStore。Returns agent state store.
源码Source io/agentscope/extensions/oss/OssDistributedStore.java:63–70

baseStore

public BaseStore baseStore()

返回基类存储。

Returns the base store.

返回Returns BaseStore
返回BaseStore。Returns base store.
源码Source io/agentscope/extensions/oss/OssDistributedStore.java:72–79

sandboxSnapshotSpec

public SandboxSnapshotSpec sandboxSnapshotSpec()

返回沙箱快照规格。

Returns the sandbox snapshot spec.

返回Returns SandboxSnapshotSpec
返回SandboxSnapshotSpec。Returns sandbox snapshot spec.
源码Source io/agentscope/extensions/oss/OssDistributedStore.java:81–84

继承成员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.