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 Type
    Method
    Description
    io.agentscope.core.state.AgentStateStore
     
    io.agentscope.harness.agent.filesystem.remote.store.BaseStore
     
    create(com.aliyun.oss.OSS ossClient, String bucketName, String keyPrefix)
    Creates an OSS distributed store.
    io.agentscope.harness.agent.sandbox.snapshot.SandboxSnapshotSpec
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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 client
      bucketName - target bucket name
      keyPrefix - object key prefix (e.g. "agentscope/")
      Returns:
      a new OSS distributed store
    • agentStateStore

      public io.agentscope.core.state.AgentStateStore agentStateStore()
      Specified by:
      agentStateStore in interface io.agentscope.harness.agent.DistributedStore
    • baseStore

      public io.agentscope.harness.agent.filesystem.remote.store.BaseStore baseStore()
      Specified by:
      baseStore in interface io.agentscope.harness.agent.DistributedStore
    • sandboxSnapshotSpec

      public io.agentscope.harness.agent.sandbox.snapshot.SandboxSnapshotSpec sandboxSnapshotSpec()
      Specified by:
      sandboxSnapshotSpec in interface io.agentscope.harness.agent.DistributedStore