Class PostgresDistributedStore
java.lang.Object
io.agentscope.extensions.postgresql.PostgresDistributedStore
- All Implemented Interfaces:
io.agentscope.harness.agent.DistributedStore
@Deprecated(since="2.1",
forRemoval=true)
public class PostgresDistributedStore
extends Object
implements io.agentscope.harness.agent.DistributedStore
Deprecated, for removal: This API element is subject to removal in a future version.
PostgreSQL-backed
DistributedStore.
Usage:
DataSource dataSource = ... // HikariCP, Druid, etc.
HarnessAgent agent = HarnessAgent.builder()
.name("my-agent")
.model("dashscope:qwen-plus")
.distributedStore(PostgresDistributedStore.create(dataSource))
.filesystem(new DockerFilesystemSpec()
.image("ubuntu:24.04"))
.build();
This configures:
PostgresAgentStateStore— agent session state in PostgreSQLPostgresBaseStore— workspace filesystem KV in PostgreSQLPostgresSnapshotSpec— sandbox snapshots as BYTEAs in PostgreSQLPostgresSandboxExecutionGuard— distributed lock via PostgreSQL advisory locks
The target database must already exist; schema and tables are created automatically by default.
-
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.AgentStateStoreDeprecated, for removal: This API element is subject to removal in a future version.io.agentscope.harness.agent.filesystem.remote.store.BaseStoreDeprecated, for removal: This API element is subject to removal in a future version.static PostgresDistributedStorecreate(DataSource dataSource) Deprecated, for removal: This API element is subject to removal in a future version.Creates a PostgreSQL distributed store.io.agentscope.harness.agent.sandbox.SandboxExecutionGuardDeprecated, for removal: This API element is subject to removal in a future version.io.agentscope.harness.agent.sandbox.snapshot.SandboxSnapshotSpecDeprecated, for removal: This API element is subject to removal in a future version.Methods 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, sessionTurnGate, taskRepository, teamClient
-
Method Details
-
create
Deprecated, for removal: This API element is subject to removal in a future version.Creates a PostgreSQL distributed store.- Parameters:
dataSource- JDBC data source for PostgreSQL- Returns:
- a new PostgreSQL distributed store
-
agentStateStore
public io.agentscope.core.state.AgentStateStore agentStateStore()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
agentStateStorein interfaceio.agentscope.harness.agent.DistributedStore
-
baseStore
public io.agentscope.harness.agent.filesystem.remote.store.BaseStore baseStore()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
baseStorein interfaceio.agentscope.harness.agent.DistributedStore
-
sandboxSnapshotSpec
public io.agentscope.harness.agent.sandbox.snapshot.SandboxSnapshotSpec sandboxSnapshotSpec()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
sandboxSnapshotSpecin interfaceio.agentscope.harness.agent.DistributedStore
-
sandboxExecutionGuard
public io.agentscope.harness.agent.sandbox.SandboxExecutionGuard sandboxExecutionGuard()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
sandboxExecutionGuardin interfaceio.agentscope.harness.agent.DistributedStore
-
io.agentscope.extensions.jdbc.JdbcDistributedStorefrom theagentscope-extensions-jdbcmodule instead. The new module provides a unified multi-database dialect abstraction that supports MySQL, PostgreSQL, H2, and SQLite with a single aggregated interface. This class is preserved unchanged for backward compatibility and will be removed in a future major release.