A task defines something that the agent should execute.

interface Task {
    cost?: number;
    created_at?: Date;
    input_artifacts?: Artifact[];
    input_params?: {
        [name: string]: string;
    }[];
    input_query: string;
    name?: string;
    output: any;
    output_additional?: {
        [name: string]: any;
    }[];
    output_artifacts?: any[];
    retries?: number;
    steps: Step[];
    task_id: string;
    task_status: AgentExecutionStatus;
    updated_at?: Date;
}

Hierarchy (view full)

Properties

cost?: number

The cost in credits resulting from the execution of the task or the step

created_at?: Date

When the execution was created

input_artifacts?: Artifact[]

List of artifact ids that are associated with the task

input_params?: {
    [name: string]: string;
}[]

Additional parameters required for the task

Type declaration

  • [name: string]: string
input_query: string

The input for the task. It can be a prompt, a question, etc

name?: string

The name of the task

output: any

The main output generated by a task or step

output_additional?: {
    [name: string]: any;
}[]

Additional output generated

Type declaration

  • [name: string]: any
output_artifacts?: any[]

List of artifact generated by the task or step

retries?: number

The number of retries for the task or step

steps: Step[]

The steps executed by the agent to complete the task

task_id: string

The unique identifier of the task

The status of the execution

updated_at?: Date

When the execution was last updated