Package io.agentscope.extensions.cos
Class CosDistributedStore
java.lang.Object
io.agentscope.extensions.cos.CosDistributedStore
- All Implemented Interfaces:
io.agentscope.harness.agent.DistributedStore
public class CosDistributedStore
extends Object
implements io.agentscope.harness.agent.DistributedStore
Tencent Cloud COS-backed
DistributedStore.
Usage:
COSClient cosClient = new COSClient(cred, clientConfig);
HarnessAgent agent = HarnessAgent.builder()
.name("my-agent")
.model("dashscope:qwen-plus")
.distributedStore(CosDistributedStore.create(cosClient, "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 CosDistributedStoreCreates a COS 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 CosDistributedStore create(com.qcloud.cos.COSClient cosClient, String bucketName, String keyPrefix) Creates a COS distributed store.- Parameters:
cosClient- initialized COS clientbucketName- target bucket namekeyPrefix- object key prefix (e.g."agentscope/")- Returns:
- a new COS 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
-