Package io.agentscope.harness.agent
Class DistributedStore.Builder
java.lang.Object
io.agentscope.harness.agent.DistributedStore.Builder
- Enclosing interface:
- DistributedStore
Builder for composing a
DistributedStore from individual components.-
Method Summary
Modifier and TypeMethodDescriptionagentStateStore(io.agentscope.core.state.AgentStateStore agentStateStore) Sets the agent state store component.asyncToolRegistry(AsyncToolRegistry asyncToolRegistry) Sets the base store component for workspace filesystem KV.build()Builds the compositeDistributedStore.messageBus(MessageBus messageBus) sandboxExecutionGuard(SandboxExecutionGuard sandboxExecutionGuard) Sets the sandbox execution guard for distributed concurrency control.sandboxSnapshotSpec(SandboxSnapshotSpec sandboxSnapshotSpec) Sets the sandbox snapshot spec.sessionTurnGate(SessionTurnGate sessionTurnGate) Sets the session turn gate for distributed per-session turn serialization.taskRepository(TaskRepository taskRepository) teamClient(TeamClient teamClient) Sets the AgentTeams client.
-
Method Details
-
agentStateStore
public DistributedStore.Builder agentStateStore(io.agentscope.core.state.AgentStateStore agentStateStore) Sets the agent state store component.- Parameters:
agentStateStore- the state store to use- Returns:
- this builder
-
baseStore
Sets the base store component for workspace filesystem KV.- Parameters:
baseStore- the base store to use- Returns:
- this builder
-
sandboxSnapshotSpec
Sets the sandbox snapshot spec.- Parameters:
sandboxSnapshotSpec- the snapshot spec to use- Returns:
- this builder
-
sandboxExecutionGuard
Sets the sandbox execution guard for distributed concurrency control.- Parameters:
sandboxExecutionGuard- the execution guard to use- Returns:
- this builder
-
messageBus
-
asyncToolRegistry
-
taskRepository
-
sessionTurnGate
Sets the session turn gate for distributed per-session turn serialization.- Parameters:
sessionTurnGate- the turn gate to use- Returns:
- this builder
-
teamClient
Sets the AgentTeams client. -
build
Builds the compositeDistributedStore.- Returns:
- a new distributed store composed from the configured components
- Throws:
NullPointerException- if agentStateStore or baseStore is not set
-