Package io.agentscope.extensions.oss
Class OssDistributedStore
java.lang.Object
io.agentscope.extensions.oss.OssDistributedStore
- All Implemented Interfaces:
io.agentscope.harness.agent.DistributedStore
public class OssDistributedStore
extends Object
implements io.agentscope.harness.agent.DistributedStore
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();
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.agentscope.harness.agent.DistributedStore
io.agentscope.harness.agent.DistributedStore.Builder, io.agentscope.harness.agent.DistributedStore.CompositeDistributedStore -
Method Summary
Modifier and TypeMethodDescriptionio.agentscope.core.state.AgentStateStoreio.agentscope.harness.agent.filesystem.remote.store.BaseStorestatic OssDistributedStoreCreates an OSS distributed store.io.agentscope.harness.agent.sandbox.snapshot.SandboxSnapshotSpecMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.agentscope.harness.agent.DistributedStore
asyncToolRegistry, messageBus, sandboxExecutionGuard, sessionTurnGate, taskRepository, teamClient
-
Method Details
-
create
public static OssDistributedStore create(com.aliyun.oss.OSS ossClient, String bucketName, String keyPrefix) Creates an OSS distributed store.- Parameters:
ossClient- initialized OSS clientbucketName- target bucket namekeyPrefix- object key prefix (e.g."agentscope/")- Returns:
- a new OSS distributed store
-
agentStateStore
public io.agentscope.core.state.AgentStateStore agentStateStore()- Specified by:
agentStateStorein interfaceio.agentscope.harness.agent.DistributedStore
-
baseStore
public io.agentscope.harness.agent.filesystem.remote.store.BaseStore baseStore()- Specified by:
baseStorein interfaceio.agentscope.harness.agent.DistributedStore
-
sandboxSnapshotSpec
public io.agentscope.harness.agent.sandbox.snapshot.SandboxSnapshotSpec sandboxSnapshotSpec()- Specified by:
sandboxSnapshotSpecin interfaceio.agentscope.harness.agent.DistributedStore
-