cayu.workflows.base
Public Cayu API. Definitions are grouped by their public source module, and definitions from private implementation modules appear on their package’s page; adding a symbol does not move existing links. The import shown at each entry is a supported public namespace. Read the Python API overview and install the required extra.
Workflow
Section titled “Workflow”from cayu.workflows import WorkflowDeterministic or agent-assisted multi-step orchestration.
Bases: ABC.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
spec |
WorkflowSpec |
required |
run (method)
Section titled “run (method)”Workflow.run(session_id: str) -> AsyncIterator[Event]Run the workflow and return a stream of structured events.
Declared non-async on purpose: implementations are expected to be
async generators (async def run(...): yield ...), which are plain
callables returning an AsyncIterator. Keeping the abstract method
non-async gives every implementation the same calling convention —
async for event in workflow.run(session_id) — instead of some
callers needing await workflow.run(...) first.
Release source · Runtime guarantees · Capability guides
WORKFLOW_ATTEMPT_EVENT_TYPE
Section titled “WORKFLOW_ATTEMPT_EVENT_TYPE”from cayu.workflows import WORKFLOW_ATTEMPT_EVENT_TYPEWORKFLOW_ATTEMPT_EVENT_TYPE = 'custom.cayu.workflow.attempt'Release source · Runtime guarantees · Capability guides
WorkflowSpec
Section titled “WorkflowSpec”from cayu.workflows import WorkflowSpecBases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
name |
str |
required |
metadata |
dict[str, Any] |
Field(default_factory=dict) |
copy_metadata (method)
Section titled “copy_metadata (method)”WorkflowSpec.copy_metadata(value: dict[str, Any]) -> dict[str, Any]validate_nonblank_name (method)
Section titled “validate_nonblank_name (method)”WorkflowSpec.validate_nonblank_name(value: str, info) -> str