Skip to main content
Recommended: use DistributedStore for one-line setup — it covers AgentStateStore, BaseStore, SandboxSnapshotSpec, and SandboxExecutionGuard together. Read on if you only need to configure AgentStateStore individually.
io.agentscope.core.state.AgentStateStore is the interface AgentScope uses to persist agent state — Memory, Workspace, Plan, and other components are serialized as State objects and stored via AgentStateStore, enabling restart recovery and cross-node sharing. State is addressed by (userId, sessionId):
  • sessionId — required, non-blank, identifies a session.
  • userId — optional. null means anonymous / single-tenant (CLI, tests, etc.).

Native Session Log is a separate contract

This page covers AgentStateStore. HarnessAgent defaults to EVENT_LOG recovery through SessionLogStore; changing stateStore alone does not migrate/share native history. LEGACY still use this interface. A file-capable BaseStore does not necessarily offer journal CAS: current OSS/COS need a separate native backend. See Session logs.

Available Implementations

Standalone Configuration

For detailed usage and code examples, see each store’s documentation: