包package
io.agentscope.core.stateio.agentscope.core.state
package io.agentscope.core.state
io.agentscope.core.state 属于状态·记忆·会话,跨调用持久化与多租户隔离。 该包共收录 22 个公开类型。
io.agentscope.core.state belongs to the State, memory & sessions layer and contains 22 public types.
接口Interfaces
| 类型Type | 种类Kind | 说明Description |
|---|---|---|
AgentStateStore | 接口interface | 定义智能体状态存储契约的接口。 Persistent storage interface for AgentScope agent state. |
State | 接口interface | 定义状态契约的接口。 Marker interface for persistable state objects. |
类Classes
| 类型Type | 种类Kind | 说明Description |
|---|---|---|
AgentState | 类class | 会话状态 Mutable per-agent runtime state. |
ConcurrentSessionModificationException | 类class | Concurrent 会话 Modification 异常,表示执行过程中的错误。 Thrown when an optimistic-concurrency save fails because another writer changed the same
session slot since it was loaded. |
InMemoryAgentStateStore | 类class | In 记忆智能体状态存储,负责持久化与读取数据。 In-memory implementation of the `AgentStateStore` interface. |
JsonFileAgentStateStore | 类class | JSON 文件状态存储 JSON file-based `AgentStateStore` implementation. |
LegacyStateLoader | 类class | Legacy 状态加载器,在多次调用之间保存和恢复会话与记忆数据。 Utility for loading v1 session data into the 2.0 `AgentState` format. |
ListHashUtil | 类class | 列表 Hash Util,在多次调用之间保存和恢复会话与记忆数据。 Utility class for computing hash values of state lists. |
PlanModeContextState | 类class | 计划模式上下文状态,在多次调用之间保存和恢复会话与记忆数据。 Persisted plan-mode flag for an agent. |
SessionInfo | 类class | 会话信息,在多次调用之间保存和恢复会话与记忆数据。 Information about a session. |
Task | 类class | 任务,在多次调用之间保存和恢复会话与记忆数据。 Persistent agent task record carried inside `TaskContextState`. |
TaskContextState | 类class | 任务上下文状态,在多次调用之间保存和恢复会话与记忆数据。 Mutable bag of `Task`s carried by `AgentState`. |
ToolContextState | 类class | 工具上下文状态,在多次调用之间保存和恢复会话与记忆数据。 Read-cache backing for file-touching tools (Read / Write / Edit). |
枚举Enums
| 类型Type | 种类Kind | 说明Description |
|---|---|---|
ConflictPolicy | 枚举enum | 定义Conflict 策略相关取值的枚举。 Policy applied when an optimistic-concurrency save of agent session state conflicts with
another writer's update. |
记录Records
| 类型Type | 种类Kind | 说明Description |
|---|---|---|
ReadCacheEntry | 记录record | 承载读取缓存条目数据的记录类型。 Snapshot of a file's contents kept in the tool read cache. |
VersionedState | 记录record | 承载 Versioned 状态数据的记录类型。 A state value paired with its optimistic-concurrency version from an `AgentStateStore`. |