Skip to main content

AgentTask Objects

Represents a task in an Agent stage. Attributes
  • status (AgentTaskStatus): The current status of the task.
  • data_hash (UUID): Unique ID for the data unit.
  • data_title (str): Name of the data unit.
  • label_branch_name (str): Name of the label branch.
  • assignee (Optional[str]): User assigned to the task.
  • last_actioned_by (Optional[str]): User who last acted on the task.
Allowed actions
  • proceed: Advance the task along a specific pathway from the current stage.
  • move: Move the task directly to another stage in the workflow.

proceed

Advances the task along a pathway from the current stage. Exactly one of pathway_name or pathway_uuid must be provided to specify the pathway to take. Parameters pathway_name (Optional[str]): Name of the pathway to follow. pathway_uuid (Optional[Union[UUID, str]]): Unique identifier of the pathway to follow. bundle (Optional[Bundle]): Optional bundle to associate with the action. Raises ValueError: If neither pathway_name nor pathway_uuid is provided.

move

Moves the task from its current stage to another stage. Parameters destination_stage_uuid (UUID): Unique identifier of the stage to move the task to. bundle (Optional[Bundle]): Optional bundle to associate with the move action. Returns None

issues

Returns the issue client for the task.

AgentStage Objects

stage_type

An Agent stage.

get_tasks

Retrieves tasks for the AgentStage. Parameters
  • assignee (Union[List[str], str, None]): A list of user emails or a single user email to filter tasks by assignee.
  • data_hash (Union[List[UUID], UUID, List[str], str, None]): A list of data unit UUIDs or a single data unit UUID to filter tasks by data hash.
  • dataset_hash (Union[List[UUID], UUID, List[str], str, None]): A list of dataset UUIDs or a single dataset UUID to filter tasks by dataset hash.
  • data_title (Optional[str]): A string to filter tasks by data title.
  • status (Optional[AnnotationTaskStatus | List[AnnotationTaskStatus]]): A status or a list of statuses to filter tasks by their status.
Returns An iterable of AnnotationTask instances from both non-Consensus and Consensus Projects.