AS AgentScopeAPI 手册 / API Reference
包package io.agentscope.core.state

io.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.

所属构件Artifacts agentscope-core

接口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`.
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.