---
sidebar:
  hidden: true
title: roboto.ai.core.task
---
## Module Contents

### AgentSubtask

```python
class roboto.ai.core.task.AgentSubtask(/, **data: Any)
```

`from roboto.ai.agent_thread import AgentSubtask`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/core/task.py#L55-L65)

Bases: `pydantic.BaseModel`

Sub-task of a task: one step of its work, tracked as a checklist item.

Carried in `AgentTask.subtasks`.

**Parameters**

- **data** (`Any`)

**Attributes**

- **AgentSubtask.status** (`AgentSubtaskStatus`): Status of the sub-task: whether the AI has done it.
- **AgentSubtask.title** (`str`): Human-readable title of the sub-task.

### AgentSubtaskStatus

```python
class roboto.ai.core.task.AgentSubtaskStatus
```

`from roboto.ai.agent_thread import AgentSubtaskStatus`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/core/task.py#L27-L38)

Bases: `roboto.compat.StrEnum`

Status of a sub-task: whether Roboto's AI has done it.

A sub-task has no status for work in progress: the AI works on a task's sub-tasks while the task itself is `AgentTaskStatus.IN_PROGRESS`.

**Attributes**

- **AgentSubtaskStatus.DONE** = `'done'`: The AI has done the sub-task.
- **AgentSubtaskStatus.PENDING** = `'pending'`: The AI has not done the sub-task.

### AgentTask

```python
class roboto.ai.core.task.AgentTask(/, **data: Any)
```

`from roboto.ai.agent_thread import AgentTask`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/core/task.py#L68-L111)

Bases: `pydantic.BaseModel`

Task in a thread's task list: a unit of work Roboto's AI plans, such as a question to answer or a deliverable.

The AI adds tasks as it plans multi-step work, works on one at a time, and records a conclusion as it completes each. Carried in [`tasks`](/docs/reference/python-sdk/roboto/ai/core/record#roboto.ai.core.record.AgentThreadRecord.tasks) and [`tasks`](/docs/reference/python-sdk/roboto/ai/core/record#roboto.ai.core.record.AgentThreadDelta.tasks), and returned by [`tasks`](/docs/reference/python-sdk/roboto/ai/agent_thread/agent_thread#roboto.ai.agent_thread.agent_thread.AgentThread.tasks).

**Parameters**

- **data** (`Any`)

**Attributes**

- **AgentTask.conclusion** (`str | None`) = `None`: Outcome the AI recorded when it completed the task, or `None` until the task is completed.

- **AgentTask.description** (`str | None`) = `None`: Human-readable description of the task's scope and intent, or `None` if it has none.

- **AgentTask.end** (`AgentTaskBoundary | None`) = `None`: Position of the tool use with which the AI completed the task.

  `None` until the task is completed, or when Roboto could not locate that tool use in the thread.

- **AgentTask.position** (`int`): Position of the task in the thread's task list, from 0 in the order the AI added the tasks.

- **AgentTask.start** (`AgentTaskBoundary | None`) = `None`: Position of the tool use with which the AI started the task.

  `None` while the task is pending, or when Roboto could not locate that tool use in the thread.

- **AgentTask.status** (`AgentTaskStatus`): Status of the task: whether the AI has started or completed it.

- **AgentTask.subtasks** (`list[AgentSubtask]`) = `None`: Sub-tasks of the task, in the order the AI added them. Completing the task marks every sub-task done.

- **AgentTask.task_id** (`int`): ID of the task, unique within its thread and never reused.

  Roboto numbers a thread's tasks from 0 in the order the AI adds them, and a fork keeps them.

- **AgentTask.title** (`str`): Short title of the task.

### AgentTaskBoundary

```python
class roboto.ai.core.task.AgentTaskBoundary(/, **data: Any)
```

`from roboto.ai.agent_thread import AgentTaskBoundary`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/core/task.py#L41-L52)

Bases: `pydantic.BaseModel`

Position in a thread of the tool use with which Roboto's AI started or completed a task.

Carried in `AgentTask.start` and `AgentTask.end`. The messages between a task's start and its end are the part of the thread in which the AI worked on the task.

**Parameters**

- **data** (`Any`)

**Attributes**

- **AgentTaskBoundary.content_sequence_num** (`int`): Index, in that message's `content`, of the [`AgentToolUseContent`](/docs/reference/python-sdk/roboto/ai/core/content#roboto.ai.core.content.AgentToolUseContent) block.
- **AgentTaskBoundary.message_sequence_num** (`int`): Index, in the thread's `messages`, of the assistant message that holds the tool use.

### AgentTaskMinimal

```python
class roboto.ai.core.task.AgentTaskMinimal(/, **data: Any)
```

`from roboto.ai.agent_thread import AgentTaskMinimal`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/core/task.py#L114-L126)

Bases: `pydantic.BaseModel`

ID and resulting status of a task that one of Roboto's AI task tools changed.

The `add_tasks`, `add_subtasks`, and `change_task` tools return it, as a JSON-compatible dictionary, in their [`AgentToolResultContent`](/docs/reference/python-sdk/roboto/ai/core/content#roboto.ai.core.content.AgentToolResultContent). The AI receives the full task list separately on each turn, so the tool results carry only these two fields.

**Parameters**

- **data** (`Any`)

**Attributes**

- **AgentTaskMinimal.status** (`AgentTaskStatus`): Status of the task after the change.
- **AgentTaskMinimal.task_id** (`int`): ID of the task the tool changed.

### AgentTaskStatus

```python
class roboto.ai.core.task.AgentTaskStatus
```

`from roboto.ai.agent_thread import AgentTaskStatus`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/core/task.py#L14-L24)

Bases: `roboto.compat.StrEnum`

Status of a task in a thread's task list: whether Roboto's AI has started or completed it.

**Attributes**

- **AgentTaskStatus.COMPLETED** = `'completed'`: The AI has completed the task and recorded its `AgentTask.conclusion`.
- **AgentTaskStatus.IN_PROGRESS** = `'in_progress'`: The AI is working on the task. At most one task in a thread has this status.
- **AgentTaskStatus.PENDING** = `'pending'`: The AI has not started the task.
