Skip to content
Roboto
Esc
↑↓navigate↵open⌘Jpreview
On this page

roboto.ai.core.task

Module Contents

AgentSubtask

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

Bases: pydantic.BaseModel

A lightweight checklist item under a top-level task.

Parameters

data Any

Attributes

AgentSubtask.status

Whether the sub-task is done.

AgentSubtask.title

title str #

Human-readable description of the sub-task.

AgentSubtaskStatus

class roboto.ai.core.task.AgentSubtaskStatus#View Source

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.

Attributes

AgentSubtaskStatus.DONE

DONE = 'done' #

Completed.

AgentSubtaskStatus.PENDING

PENDING = 'pending' #

Not done yet.

AgentTask

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

Bases: pydantic.BaseModel

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

Parameters

data Any

Attributes

AgentTask.conclusion

conclusion str | None = None #

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

AgentTask.description

description str | None = None #

Longer description delimiting the task’s scope and intent.

AgentTask.end

end AgentTaskBoundary | None = None #

Where the task was completed. None until then.

AgentTask.position

position int #

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

AgentTask.start

start AgentTaskBoundary | None = None #

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

AgentTask.status

Current lifecycle state.

AgentTask.subtasks

subtasks list[AgentSubtask] = None #

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

AgentTask.task_id

task_id int #

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

AgentTask.title

title str #

Short title of the task.

AgentTaskBoundary

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

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

Attributes

AgentTaskBoundary.content_sequence_num

content_sequence_num int #

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

AgentTaskBoundary.message_sequence_num

message_sequence_num int #

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

AgentTaskMinimal

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

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

Attributes

AgentTaskMinimal.status

Resulting status of the affected task.

AgentTaskMinimal.task_id

task_id int #

Id of the affected task.

AgentTaskStatus

class roboto.ai.core.task.AgentTaskStatus#View Source

Bases: roboto.compat.StrEnum

Lifecycle state of a top-level agent task.

Attributes

AgentTaskStatus.COMPLETED

COMPLETED = 'completed' #

Finished; carries a AgentTask.conclusion.

AgentTaskStatus.IN_PROGRESS

IN_PROGRESS = 'in_progress' #

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

AgentTaskStatus.PENDING

PENDING = 'pending' #

Not started yet.

Was this page helpful?