AS AgentScopeAPI 手册 / API Reference
类class agentscope.sop

SOPRunState

class SOPRunState(BaseModel)
源码Source agentscope/sop/_state.py:104–151

SOP 运行状态,把复杂任务拆分为可执行步骤并驱动流程。位于 agentscope.sop 包。核心成员包括 phase。

It covers the SOP's own state and nothing below it: an executor that keeps state of its own (an :class:~..agent.Agent does) is persisted by whoever built it, the same way it is built.

属性摘要Property Summary

属性Property说明Description
phasecomputed_field
获取阶段。
Where the run stands, worked out from its steps.

属性摘要Attribute Summary

属性Attribute类型Type说明Description值Value
idstr
标识字段。
Field(default_factory=_generate_id)
inputslist[Msg]
`inputs` 字段。
Field(default_factory=list)
stepslist[SerializeAsAny[SOPStepRunState]]
步骤字段。
Field(default_factory=list)
created_atstr
已创建 at字段。
Field(default_factory=_generate_timestamp)

属性详情Attribute Detail

id

str = Field(default_factory=_generate_id)

标识字段。声明为 str。

The id field.

源码Source agentscope/sop/_state.py:112

inputs

list[Msg] = Field(default_factory=list)

inputs 字段。声明为 list[Msg]。

The inputs field.

源码Source agentscope/sop/_state.py:115

steps

list[SerializeAsAny[SOPStepRunState]] = Field(default_factory=list)

步骤字段。声明为 list[SerializeAsAny[SOPStepRunState]]。

The steps field.

源码Source agentscope/sop/_state.py:118

created_at

str = Field(default_factory=_generate_timestamp)

已创建 at字段。声明为 str。

The created at field.

源码Source agentscope/sop/_state.py:127

属性详情Property Detail

phase

def phase() -> SOPPhase
computed_field

获取阶段。

Dumped alongside the stored fields so a reader can sort runs by it without replaying every step.

返回Returns SOPPhase
返回SOPPhase。`SOPPhase`:
源码Source agentscope/sop/_state.py:132–151
基于官方固定版本源码静态生成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.