1. Status Update

Describes the state of the task and the agent’s progress. Messages in the status are appended to the task’s history.

await task.set_status(
    TaskStatus(
        state=TaskState.COMPLETED,
        message=Message(parts=[TextPart(text="I've finished the task!")])
    )
)
  1. Artifact Update

Artifacts represent the result of the task. Indices are used to identify artifacts within a task. Updates append to existing artifacts if the index matches and the chunk is not the last one.

await task.upsert_artifact(
    Artifact(parts=[TextPart(text="I've finished the task!")], index=0)
)
  1. Append Messages to History

Stores relevant information, such as thoughts or past communications, related to the task. (elkarbackup/elkarbackup-docker - GitHub)

await task.add_messages_to_history(
    [Message(parts=[TextPart(text="I'm working on the task...")])]
)