Represents the response for the message.send method.
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field payload. The payload of the response. payload can be only one of the following: |
|
task |
The task created or updated by the message. |
message |
A message from the agent. |
Task
Task is the core unit of action for A2A. It has a current status and when results are created for the task they are stored in the artifact. If there are multiple turns for a task, these are stored in history.
| JSON representation |
|---|
{ "id": string, "contextId": string, "status": { object ( |
| Fields | |
|---|---|
id |
Required. Unique identifier (e.g. UUID) for the task, generated by the server for a new task. |
contextId |
Unique identifier (e.g. UUID) for the contextual collection of interactions (tasks and messages). |
status |
Required. The current status of a |
artifacts[] |
A set of output artifacts for a |
history[] |
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a |
metadata |
protolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value object to store custom metadata about a task. |
TaskStatus
A container for the status of a task
| JSON representation |
|---|
{ "state": enum ( |
| Fields | |
|---|---|
state |
Required. The current state of this task. |
message |
A message associated with the status. |
timestamp |
ISO 8601 Timestamp when the status was recorded. Example: "2023-10-27T10:00:00Z" Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
TaskState
Defines the possible lifecycle states of a Task.
| Enums | |
|---|---|
TASK_STATE_UNSPECIFIED |
The task is in an unknown or indeterminate state. |
TASK_STATE_SUBMITTED |
Indicates that a task has been successfully submitted and acknowledged. |
TASK_STATE_WORKING |
Indicates that a task is actively being processed by the agent. |
TASK_STATE_COMPLETED |
Indicates that a task has finished successfully. This is a terminal state. |
TASK_STATE_FAILED |
Indicates that a task has finished with an error. This is a terminal state. |
TASK_STATE_CANCELED |
Indicates that a task was canceled before completion. This is a terminal state. |
TASK_STATE_INPUT_REQUIRED |
Indicates that the agent requires additional user input to proceed. This is an interrupted state. |
TASK_STATE_REJECTED |
Indicates that the agent has decided to not perform the task. This may be done during initial task creation or later once an agent has determined it can't or won't proceed. This is a terminal state. |
TASK_STATE_AUTH_REQUIRED |
Indicates that authentication is required to proceed. This is an interrupted state. |
Artifact
Artifacts represent task outputs.
| JSON representation |
|---|
{
"artifactId": string,
"name": string,
"description": string,
"parts": [
{
object ( |
| Fields | |
|---|---|
artifactId |
Required. Unique identifier (e.g. UUID) for the artifact. It must be unique within a task. |
name |
A human readable name for the artifact. |
description |
Optional. A human readable description of the artifact. |
parts[] |
Required. The content of the artifact. Must contain at least one part. |
metadata |
Optional. Metadata included with the artifact. |
extensions[] |
The URIs of extensions that are present or contributed to this Artifact. |