staff_ai/task

Types

A task that can be performed by an agent

pub type Task {
  Task(
    id: UUID,
    title: String,
    description: String,
    status: TaskStatus,
    assigned_agent: Option(UUID),
    created_at: Time,
    updated_at: Time,
    completed_at: Option(Time),
    cancelled_at: Option(Time),
    failed_at: Option(Time),
  )
}

Constructors

  • Task(
      id: UUID,
      title: String,
      description: String,
      status: TaskStatus,
      assigned_agent: Option(UUID),
      created_at: Time,
      updated_at: Time,
      completed_at: Option(Time),
      cancelled_at: Option(Time),
      failed_at: Option(Time),
    )

    Arguments

    • id

      The unique identifier of the task

    • title

      A meaningful title of the task

    • description

      A description of the task, must be detailed enough to be performed

    • status

      The status of the task

    • assigned_agent

      The unique identifier of the agent that has been assigned to perform the task

    • created_at

      The time when the task was created

    • updated_at

      The time when the task was last updated

    • completed_at

      The time when the task was completed

    • cancelled_at

      The time when the task was cancelled

    • failed_at

      The time when the task has failed

The status of the task

pub type TaskStatus {
  Ready
  InProgress
  Completed
  Cancelled
  Failed
}

Constructors

  • Ready

    The task is ready to be performed

  • InProgress

    The task is currently being performed

  • Completed

    The task has been completed

  • Cancelled

    The task has been cancelled

  • Failed

    The task has failed

Represents a unique identifier of a task, which is a string in the UUID format.

pub type UUID =
  String

Functions

pub fn create(
  title: String,
  description: String,
  assigned_agent: Option(String),
) -> Task

The unique identifier of the task A meaningful title of the task A description of the task, must be detailed enough to be performed The status of the task The unique identifier of the agent that has been assigned to perform the task The time when the task was created The time when the task was last updated The time when the task was completed The time when the task was cancelled The time when the task has failed

Search Document