> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encord.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflow.stages.agent

## AgentTask Objects

```python theme={"dark"}
class AgentTask(WorkflowTask)
```

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

```python theme={"dark"}
def proceed(pathway_name: Optional[str] = None,
            pathway_uuid: Optional[Union[UUID, str]] = None,
            *,
            bundle: Optional[Bundle] = None) -> None
```

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

```python theme={"dark"}
def move(*,
         destination_stage_uuid: UUID,
         bundle: Optional[Bundle] = None) -> None
```

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

```python theme={"dark"}
@property
def issues() -> TaskIssues
```

Returns the issue client for the task.

## AgentStage Objects

```python theme={"dark"}
@dataclass(frozen=True)
class AgentStage(WorkflowStageBase)
```

#### stage\_type

An Agent stage.

#### get\_tasks

```python theme={"dark"}
def get_tasks(
    *,
    assignee: Union[List[str], str, None] = None,
    data_hash: Union[List[UUID], UUID, List[str], str, None] = None,
    dataset_hash: Union[List[UUID], UUID, List[str], str, None] = None,
    data_title: Optional[str] = None,
    status: Optional[Union[AgentTaskStatus, List[AgentTaskStatus]]] = None
) -> Iterable[AgentTask]
```

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.
