Skip to content

Models

All models are importable directly from pyawe:

from pyawe import Workflow, Task, Job, Status, TaskType

Enumerations

pyawe.models.Status

Bases: str, Enum

Lifecycle status shared by workflows, tasks, and jobs.

CANCELLED, REWORKED, and FAILED are task-only and system-managed: CANCELLED is set automatically by the propagator when a task is on a rejected decision branch; REWORKED is set only by the manual rework trigger (POST /tasks/{id}/rework); FAILED is set only when a checkpoint's required check is marked failed. None of these should be set via update_task.

pyawe.models.ScheduleStatus

Bases: str, Enum

Schedule health indicator shared by workflows, tasks, and jobs.

pyawe.models.TaskType

Bases: str, Enum

Task execution model.

pyawe.models.PortDirection

Bases: str, Enum

Direction of a task port.

pyawe.models.PortValueType

Bases: str, Enum

Data type carried by a task or work item port.

SECRET is valid only on work item port specs: it declares the slot, but the value itself is set per task instance via TaskSecretsClient after instantiation.

pyawe.models.ScriptType

Bases: str, Enum

Execution mechanism for an automated task.

pyawe.models.LoopType

Bases: str, Enum

Iteration strategy for a loop block.


Auth

pyawe.models.LoginInfo dataclass

LoginInfo(token: str, user_id: str, email: str, username: str, roles: list[str], permissions: list[str])

Session information returned by a successful :meth:AweClient.login call.


Workflows

pyawe.models.Workflow dataclass

Workflow(id: UUID, name: str, is_template: bool, created_at: datetime, updated_at: datetime, status: Status, schedule_status: ScheduleStatus, is_shared: bool, created_by: str | None = None, description: str | None = None, job_id: UUID | None = None, team_id: UUID | None = None, organization_id: UUID | None = None, parent_loop_block_id: UUID | None = None, sort_order: int | None = None, story_points: int | None = None, ticket_type: str | None = None, priority: str | None = None, reporter_id: UUID | None = None, resolved_at: datetime | None = None, external_reporter_first_name: str | None = None, external_reporter_last_name: str | None = None, external_reporter_email: str | None = None, togra_workflow_id: UUID | None = None, togra_project_id: UUID | None = None, ticket_number: int | None = None, workflow_number: int | None = None, project_code: str | None = None, ephemeral: bool = False, origin_kind: str | None = None, origin_ref: str | None = None, ai_processed_at: datetime | None = None, ai_confidence: float | None = None, ai_should_route: bool | None = None, ai_outcome_feedback: str | None = None, ai_outcome_feedback_by: UUID | None = None, ai_outcome_feedback_at: datetime | None = None, ai_outcome_feedback_reason: str | None = None, ai_outcome_feedback_note_id: UUID | None = None, duplicate_of_workflow_id: UUID | None = None)

A workflow definition or instance.

organization_id class-attribute instance-attribute

organization_id: UUID | None = None

Denormalized from team_id; read-only.

sort_order class-attribute instance-attribute

sort_order: int | None = None

Display order within the parent job (backlog or sprint).

story_points class-attribute instance-attribute

story_points: int | None = None

Story point estimate for this story-workflow.

external_reporter_first_name class-attribute instance-attribute

external_reporter_first_name: str | None = None

Set when the reporter has no UUM user row. Cleared by an empty string, NOT null — see :meth:WorkflowsClient.update.

ticket_number class-attribute instance-attribute

ticket_number: int | None = None

Human-readable, globally-sequenced cunav ticket number. Read-only.

workflow_number class-attribute instance-attribute

workflow_number: int | None = None

Per-project sequence number (e.g. the 4 in P1-W0004). Read-only.

project_code class-attribute instance-attribute

project_code: str | None = None

The owning project's code, if the workflow's job is linked to one. Read-only.

ephemeral class-attribute instance-attribute

ephemeral: bool = False

On a template: instances cloned from it are ephemeral (deleted once finished; their history stays, see :class:~pyawe.client.WorkflowRunsClient). On an instance: whether it is reaped.

origin_kind class-attribute instance-attribute

origin_kind: str | None = None

What an instance was made for (e.g. "dam-asset"), set when cloning.

origin_ref class-attribute instance-attribute

origin_ref: str | None = None

The identifier within origin_kind (e.g. an asset id).

ai_outcome_feedback class-attribute instance-attribute

ai_outcome_feedback: str | None = None

"helpful" or "unhelpful".

pyawe.models.WorkflowWithTasks dataclass

WorkflowWithTasks(workflow: Workflow, tasks: list[Task] = list(), links: list[TaskLink] = list(), project_code: str | None = None)

Workflow with its associated tasks and inter-task links.

project_code class-attribute instance-attribute

project_code: str | None = None

The owning project's code, if the workflow's job is linked to one. Read-only.


Tasks

pyawe.models.Task dataclass

Task(id: UUID, name: str, is_template: bool, created_at: datetime, updated_at: datetime, status: Status, schedule_status: ScheduleStatus, workflow_id: UUID, is_start: bool, is_end: bool, task_type: str, created_by: str | None = None, description: str | None = None, rework_task_id: UUID | None = None, loop_block_id: UUID | None = None, assigned_to: str | None = None, start_time: datetime | None = None, end_time: datetime | None = None, decision_outcome: str | None = None, decision_input_port: str | None = None, input_values: Any | None = None, output_values: Any | None = None, is_locked: bool = False, canvas_x: float | None = None, canvas_y: float | None = None, effort: int | None = None, priority: str = 'none', due_time: datetime | None = None, branch_name: str | None = None, task_number: int | None = None, port_namespace: str | None = None, reworked_from_task_id: UUID | None = None)

A task within a workflow.

task_type instance-attribute

task_type: str

One of "standard", "decision", "automated", "loop_block".

loop_block_id class-attribute instance-attribute

loop_block_id: UUID | None = None

Set when task_type == "loop_block".

assigned_to class-attribute instance-attribute

assigned_to: str | None = None

User UUID string; no foreign-key constraint (users live in a separate service).

decision_input_port class-attribute instance-attribute

decision_input_port: str | None = None

Input port name that drives auto-decide for decision tasks.

is_locked class-attribute instance-attribute

is_locked: bool = False

When True, structural edits are blocked for non-privileged users.

effort class-attribute instance-attribute

effort: int | None = None

Unitless effort estimate (e.g. story points). None means not yet estimated.

priority class-attribute instance-attribute

priority: str = 'none'

"none" (default), "low", "medium", "high", or "critical".

branch_name class-attribute instance-attribute

branch_name: str | None = None

Git branch this task is working against.

task_number class-attribute instance-attribute

task_number: int | None = None

Sequence number within the owning project's task numbering. Read-only.

port_namespace class-attribute instance-attribute

port_namespace: str | None = None

User-defined prefix (^[a-z][a-z0-9_]*$) used instead of t{task_number} when a checkpoint mirrors this task's output ports.

reworked_from_task_id class-attribute instance-attribute

reworked_from_task_id: UUID | None = None

Set only on a task spawned by the manual rework trigger; read-only provenance.

pyawe.models.TaskWithContext dataclass

TaskWithContext(task: Task, workflow_name: str, job_id: UUID | None = None, job_name: str | None = None, project_code: str | None = None)

A task enriched with its workflow and job names, returned by list_mine.

project_code class-attribute instance-attribute

project_code: str | None = None

The owning project's code, if the job is linked to one. Read-only.

TaskLink(from_task_id: UUID, to_task_id: UUID, branch_label: str | None = None, data_bindings: Any | None = None)

A directed edge between two tasks.

branch_label class-attribute instance-attribute

branch_label: str | None = None

Set only when the source task is a decision task.

data_bindings class-attribute instance-attribute

data_bindings: Any | None = None

List of {from: output_name, to: input_name} mappings propagated on completion.

pyawe.models.DataBinding dataclass

DataBinding(from_port: str, to_port: str)

A single data binding on a task link edge.

from_port instance-attribute

from_port: str

Name of the output port on the upstream task.

to_port instance-attribute

to_port: str

Name of the input port on the downstream task.

pyawe.models.TaskPortSpec dataclass

TaskPortSpec(id: UUID, task_id: UUID, direction: str, name: str, value_type: str, required: bool, sort_order: int, created_at: datetime, updated_at: datetime, description: str | None = None, default_value: Any | None = None)

Port specification (input or output) defined on a task.

direction instance-attribute

direction: str

"input" or "output".

value_type instance-attribute

value_type: str

One of "string", "number", "boolean", "json", "file", "dam_asset".

pyawe.models.TaskPortValues dataclass

TaskPortValues(specs: list[TaskPortSpec] = list(), values: Any | None = None, secret_set: list[str] = list())

Port specs paired with their current runtime values.

values class-attribute instance-attribute

values: Any | None = None

Dict of {name: value} or None when no values have been set.

secret_set class-attribute instance-attribute

secret_set: list[str] = field(default_factory=list)

Names of secret input ports that currently have an encrypted value stored.

pyawe.models.TaskScript dataclass

TaskScript(id: UUID, task_id: UUID, script_type: str, timeout_secs: int, retry_limit: int, created_at: datetime, updated_at: datetime, endpoint: str | None = None, script_body: str | None = None, execution_profile_id: UUID | None = None, connection_id: UUID | None = None)

Automated execution script attached to a task.

script_type instance-attribute

script_type: str

One of "webhook", "shell", "python", "nodejs", "mcp_tool", "email" or "gha_job".

connection_id class-attribute instance-attribute

connection_id: UUID | None = None

Connection profile to resolve auth from at run time. Required (must reference an smtp connection) when script_type == "email".

pyawe.models.TaskRun dataclass

TaskRun(id: UUID, task_id: UUID | None, created_at: datetime, runner_id: str | None = None, started_at: datetime | None = None, completed_at: datetime | None = None, outcome: str | None = None, input_json: Any | None = None, output_json: Any | None = None, error_message: str | None = None, task_name: str | None = None, workflow_id: UUID | None = None, workflow_name: str | None = None, job_id: UUID | None = None, job_name: str | None = None, origin_kind: str | None = None, origin_ref: str | None = None)

Record of a single automated task execution attempt.

task_id instance-attribute

task_id: UUID | None

None once the task has been deleted (the run is kept as history).

outcome class-attribute instance-attribute

outcome: str | None = None

"Success", "Failure", or "Timeout".

pyawe.models.TaskTeamRole dataclass

TaskTeamRole(task_id: UUID, team_role_id: UUID, assigned_at: datetime)

Assignment of a team role to a task.


Jobs

pyawe.models.Job dataclass

Job(id: UUID, name: str, status: Status, schedule_status: ScheduleStatus, created_at: datetime, updated_at: datetime, archived: bool, team_id: UUID | None = None, organization_id: UUID | None = None, project_id: UUID | None = None, job_type: str | None = None, start_date: str | None = None, end_date: str | None = None, ai_enabled: bool = False, ai_togra_project_id: UUID | None = None, ai_togra_job_id: UUID | None = None, ai_togra_template_id: UUID | None = None, ai_route_confidence_threshold: float | None = None, ai_rules: Any | None = None, email_connection_id: UUID | None = None, inbound_email_connection_id: UUID | None = None, project_code: str | None = None, ephemeral: bool = False, auto_complete: bool = True)

A job that groups related workflow instances.

organization_id class-attribute instance-attribute

organization_id: UUID | None = None

Denormalized from team_id; read-only.

job_type class-attribute instance-attribute

job_type: str | None = None

"sprint", "kanban", or "backlog"; None for legacy jobs.

start_date class-attribute instance-attribute

start_date: str | None = None

ISO 8601 date string; set when job_type == "sprint".

end_date class-attribute instance-attribute

end_date: str | None = None

ISO 8601 date string; set when job_type == "sprint".

ai_enabled class-attribute instance-attribute

ai_enabled: bool = False

Only meaningful for job_type == "kanban" queues: whether new tickets are dispatched to cunav's AI triage webhook.

ai_rules class-attribute instance-attribute

ai_rules: Any | None = None

Per-outcome-type enable/threshold config, e.g. [{"type": "flag_duplicate", "enabled": true, "confidence_threshold": 0.6}].

project_code class-attribute instance-attribute

project_code: str | None = None

The linked project's code, if any. Read-only.

ephemeral class-attribute instance-attribute

ephemeral: bool = False

Machine-made job: deleted once it is empty (its history is kept).

auto_complete class-attribute instance-attribute

auto_complete: bool = True

False: propagation never marks the job Complete (a standing container job).

pyawe.models.JobWithWorkflows dataclass

JobWithWorkflows(job: Job, workflows: list[Workflow] = list())

Job with its associated workflows.


Loop Blocks

pyawe.models.LoopBlock dataclass

LoopBlock(id: UUID, task_id: UUID, outer_workflow_id: UUID, inner_workflow_id: UUID, loop_type: str, loop_config: Any, created_at: datetime, updated_at: datetime)

A loop block that wraps an inner workflow repeated across iterations.

task_id instance-attribute

task_id: UUID

The task in the outer workflow that represents this loop block.

inner_workflow_id instance-attribute

inner_workflow_id: UUID

The workflow executed on each iteration.

loop_type instance-attribute

loop_type: str

"count", "while", or "for_each".

loop_config instance-attribute

loop_config: Any

Type-dependent config: {"count": N}, {"condition": "continue"}, or {"collection": [...]}.

pyawe.models.CreateLoopBlockResponse dataclass

CreateLoopBlockResponse(task: Task, loop_block: LoopBlock)

Response from POST /loop-blocks: the new outer task and its loop block.


Execution Profiles

pyawe.models.ExecutionProfile dataclass

ExecutionProfile(id: UUID, name: str, image: str, cpu_request: str, cpu_limit: str, memory_request: str, memory_limit: str, created_by: str, created_at: datetime, updated_at: datetime, description: str | None = None, image_pull_policy: str = 'IfNotPresent', enable_buildkit_sidecar: bool = False, runner_pool: str = 'default')

Approved Kubernetes execution environment for automated tasks.

image instance-attribute

image: str

Full OCI image reference, e.g. python:3.12-slim.

enable_buildkit_sidecar class-attribute instance-attribute

enable_buildkit_sidecar: bool = False

Run a rootless buildkitd as a native Kubernetes sidecar alongside this profile's task container.

runner_pool class-attribute instance-attribute

runner_pool: str = 'default'

Which awe-runner pool dispatches this profile's tasks.