roboto.ai.core.task#

Module Contents#

class roboto.ai.core.task.AgentSubtask(/, **data)#

Bases: pydantic.BaseModel

A lightweight checklist item under a top-level task.

Parameters:

data (Any)

status: AgentSubtaskStatus#

Whether the sub-task is done.

title: str#

Human-readable description of the sub-task.

class roboto.ai.core.task.AgentSubtaskStatus#

Bases: roboto.compat.StrEnum

Lifecycle state of a sub-task.

Sub-tasks are never activated independently — they are implicitly active with their parent task — so they have no in_progress state.

DONE = 'done'#

Completed.

PENDING = 'pending'#

Not done yet.

class roboto.ai.core.task.AgentTask(/, **data)#

Bases: pydantic.BaseModel

A top-level task the agent is tracking within a thread.

Parameters:

data (Any)

conclusion: str | None = None#

Outcome recorded when the task was completed. None until then.

description: str | None = None#

Longer description delimiting the task’s scope and intent.

end: AgentTaskBoundary | None = None#

Where the task was completed. None until then.

position: int#

Display order among the thread’s top-level tasks.

start: AgentTaskBoundary | None = None#

Where the task most recently became in_progress. None if never started.

status: AgentTaskStatus#

Current lifecycle state.

subtasks: list[AgentSubtask] = None#

Ordered sub-tasks. A task cannot be completed until all of these are done.

task_id: int#

Thread-monotonic id, stable for the life of the thread. The model references this id to start or complete the task.

title: str#

Short title of the task.

class roboto.ai.core.task.AgentTaskBoundary(/, **data)#

Bases: pydantic.BaseModel

Position in the conversation where a top-level task’s active span begins or ends.

Identifies the assistant message and the content block within it whose tool call drove the transition, so callers can anchor a task to the part of the thread that worked on it.

Parameters:

data (Any)

content_sequence_num: int#

Index of the tool-call content block within that message.

message_sequence_num: int#

Index of the assistant message whose tool call stamped this boundary.

class roboto.ai.core.task.AgentTaskMinimal(/, **data)#

Bases: pydantic.BaseModel

Minimal acknowledgement returned by the task mutation tools.

The full list reaches the model through the per-turn injected context, so the mutation tools echo only the affected task’s id and resulting status.

Parameters:

data (Any)

status: AgentTaskStatus#

Resulting status of the affected task.

task_id: int#

Id of the affected task.

class roboto.ai.core.task.AgentTaskStatus#

Bases: roboto.compat.StrEnum

Lifecycle state of a top-level agent task.

COMPLETED = 'completed'#

Finished; carries a AgentTask.conclusion.

IN_PROGRESS = 'in_progress'#

The single active task. At most one task per thread is in this state.

PENDING = 'pending'#

Not started yet.