包package
agentscope.app.storageagentscope.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:27SOPVerifier
= Annotated[Union[AgentVerifier, HumanVerifier], Field(discriminator='type')]SOP 校验器字段。
The SOP verifier field.
源码Source
agentscope/app/storage/_model/_sop.py:67SessionOrigin
= Annotated[Union[UserOrigin, ScheduleOrigin, ChannelOrigin, TeamOrigin, SOPOrigin], Field(discriminator='type')]会话来源字段。
The session origin field.
源码Source
agentscope/app/storage/_model/_session.py:99