AS AgentScopeAPI 手册 / API Reference
包package agentscope.app.storage

agentscope.app.storage

module agentscope.app.storage

agentscope.app.storage 属于状态·记忆·会话,跨调用持久化与多租户隔离。 该包共收录 52 个公开类型。

The storage module in agentscope.

源码Source agentscope/app/storage/__init__.py:1

类Classes

AgentChatConfig
类class
智能体聊天配置,保存相关配置项。
The settings that apply when the agent talks in text.
AgentData
类class
智能体数据模型。
The agent data model.
AgentRecord
类class
智能体 ORM 模型。
The agent ORM model.
AgentVerifier
类class
智能体校验器,在多次调用之间保存和恢复会话与记忆数据。
A verifier that is itself an agent.
AsyncSQLAlchemyStorage
类class
异步 SQLAlchemy 存储,负责持久化与读取数据。
Async SQLAlchemy-backed :class:`StorageBase` implementation.
ChannelBinding
类class
渠道绑定,在多次调用之间保存和恢复会话与记忆数据。
One routing rule: match an inbound event, then decide which agent handles it and how its session is grouped.
ChannelOrigin
类class
一种会话入站平台消息已打开。
A session an inbound platform message opened.
ChannelRecord
类class
渠道记录,在多次调用之间保存和恢复会话与记忆数据。
Persistent record for a channel instance — the single source of truth. Running adapter instances are a projection of this record.
ChatModelConfig
类class
模型配置类。
The model configuration class.
ChunkerConfig
类class
切分器配置,保存相关配置项。
Chunker configuration persisted alongside a knowledge base.
CredentialRecord
类class
凭证记录,在多次调用之间保存和恢复会话与记忆数据。
The credential model used for storing credentials.
EmbeddingModelConfig
类class
向量化模型配置,保存相关配置项。
Configuration for constructing an embedding model from a credential.
HumanVerifier
类class
人工校验器,在多次调用之间保存和恢复会话与记忆数据。
A verifier that asks a person and waits for the answer.
InviteConfig
类class
邀请配置,保存相关配置项。
User-editable invite settings for :class:`AgentData`.
KnowledgeBaseData
类class
可变负载的知识库基类类。
The mutable payload of a knowledge base record.
KnowledgeBaseRecord
类class
知识库记录,在多次调用之间保存和恢复会话与记忆数据。
A persisted knowledge base record.
KnowledgeDocumentData
类class
可变负载的知识库文档类。
The mutable payload of a knowledge document record.
KnowledgeDocumentRecord
类class
知识库文档记录,在多次调用之间保存和恢复会话与记忆数据。
A persisted knowledge document record.
MCPRecord
类class
MCP 记录,在多次调用之间保存和恢复会话与记忆数据。
One MCP a user has installed, at the user level rather than in any one workspace.
RealtimeModelConfig
类class
实时语音模型配置类。
The realtime voice model configuration class.
RedisStorage
类class
Redis 存储,负责持久化与读取数据。
The Redis storage implementation.
RoutingConfig
类class
路由配置,保存相关配置项。
Ordered routing rules for a channel.
SOPAgentRef
类class
SOP 智能体引用,在多次调用之间保存和恢复会话与记忆数据。
Which agent does something, and in which conversation.
SOPData
类class
SOP 数据,在多次调用之间保存和恢复会话与记忆数据。
A procedure: its milestones, in order.
SOPOrigin
类class
SOP 来源,在多次调用之间保存和恢复会话与记忆数据。
A session a SOP run opened to hold one of its conversations.
SOPRecord
类class
SOP 记录,在多次调用之间保存和恢复会话与记忆数据。
A stored procedure.
SOPRunRecord
类class
SOP 运行记录,在多次调用之间保存和恢复会话与记忆数据。
One run of a procedure.
SOPStepDataV1
类class
SOP 步骤数据 V 1,在多次调用之间保存和恢复会话与记忆数据。
One milestone, as :class:`~agentscope.sop.SOPStep` runs it. An incompatible change becomes a new model discriminated on :attr:`version`.
SOPWorkspaceGrain
类class
SOP 工作区粒度,在多次调用之间保存和恢复会话与记忆数据。
How many workspaces a run gets. Always minted for the run, never shared with another run.
ScheduleData
类class
调度配置数据。
The schedule configuration data.
ScheduleOrigin
类class
调度来源,在多次调用之间保存和恢复会话与记忆数据。
A session a schedule opened on its due date.
ScheduleRecord
类class
调度记录,在多次调用之间保存和恢复会话与记忆数据。
Persisted schedule record.
ScheduleSource
类class
调度来源,在多次调用之间保存和恢复会话与记忆数据。
The source that created the schedule.
SessionConfig
类class
会话配置,保存相关配置项。
Session configuration — set at creation, updatable via PATCH.
SessionKnowledgeConfig
类class
会话知识库配置,保存相关配置项。
Session-level knowledge base attachment.
SessionNaming
类class
会话命名,在多次调用之间保存和恢复会话与记忆数据。
How :attr:`SessionConfig.name` is maintained.
SessionRecord
类class
会话类。
The session record.
SessionScope
类class
会话范围,在多次调用之间保存和恢复会话与记忆数据。
How inbound messages are grouped into agent sessions.
SessionSettings
类class
会话设置,保存相关配置项。
Settings for a session a channel or SOP run opens for a user.
SessionSource
类class
会话来源,在多次调用之间保存和恢复会话与记忆数据。
The kinds a session's source used to come in.
SkillRecord
类class
技能记录,在多次调用之间保存和恢复会话与记忆数据。
One skill a user has installed, at the user level rather than in any one workspace — the skill counterpart of :class:`MCPRecord`.
StorageBase
类class
存储抽象基类类。
The storage abstract base class.
TTSModelConfig
类class
TTS 模型配置类。
The TTS model configuration class.
TeamData
类class
团队数据模型。
The team data model.
TeamMember
类class
团队成员,在多次调用之间保存和恢复会话与记忆数据。
An entry in a team's member roster.
TeamOrigin
类class
团队来源,在多次调用之间保存和恢复会话与记忆数据。
A session a team minted for one of its members.
TeamRecord
类class
团队 ORM 模型。
The team ORM model.
UserOrigin
类class
用户来源,在多次调用之间保存和恢复会话与记忆数据。
A session a person opened themselves.
UserRecord
类class
用户类。
The user record.

属性Attributes

KnowledgeDocumentStatus
字段attribute
—
SOPVerifier
字段attribute
—
SessionOrigin
字段attribute
—

属性详情Attribute Details

KnowledgeDocumentStatus

 = Literal['pending', 'parsing', 'chunking', 'indexing', 'ready', 'error']

知识库文档状态字段。

The knowledge document status field.

源码Source agentscope/app/storage/_model/_knowledge_document.py:27

SOPVerifier

 = Annotated[Union[AgentVerifier, HumanVerifier], Field(discriminator='type')]

SOP 校验器字段。

The SOP verifier field.

源码Source agentscope/app/storage/_model/_sop.py:67

SessionOrigin

 = Annotated[Union[UserOrigin, ScheduleOrigin, ChannelOrigin, TeamOrigin, SOPOrigin], Field(discriminator='type')]

会话来源字段。

The session origin field.

源码Source agentscope/app/storage/_model/_session.py:99
基于官方固定版本源码静态生成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.