StreamResponse

A wrapper object used in streaming operations to encapsulate different types of response data.

JSON representation
{

  // Union field payload can be only one of the following:
  "task": {
    object (Task)
  },
  "message": {
    object (Message)
  },
  "statusUpdate": {
    object (TaskStatusUpdateEvent)
  },
  "artifactUpdate": {
    object (TaskArtifactUpdateEvent)
  }
  // End of list of possible types for union field payload.
}
Fields
Union field payload. The payload of the stream response. payload can be only one of the following:
task

object (Task)

A Task object containing the current state of the task.

message

object (Message)

A Message object containing a message from the agent.

statusUpdate

object (TaskStatusUpdateEvent)

An event indicating a task status update.

artifactUpdate

object (TaskArtifactUpdateEvent)

An event indicating a task artifact update.

TaskStatusUpdateEvent

An event sent by the agent to notify the client of a change in a task's status.

JSON representation
{
  "taskId": string,
  "contextId": string,
  "status": {
    object (TaskStatus)
  },
  "metadata": {
    object
  }
}
Fields
taskId

string

Required. The ID of the task that has changed.

contextId

string

Required. The ID of the context that the task belongs to.

status

object (TaskStatus)

Required. The new status of the task.

metadata

object (Struct format)

Optional. Metadata associated with the task update.

TaskArtifactUpdateEvent

A task delta where an artifact has been generated.

JSON representation
{
  "taskId": string,
  "contextId": string,
  "artifact": {
    object (Artifact)
  },
  "append": boolean,
  "lastChunk": boolean,
  "metadata": {
    object
  }
}
Fields
taskId

string

Required. The ID of the task for this artifact.

contextId

string

Required. The ID of the context that this task belongs to.

artifact

object (Artifact)

Required. The artifact that was generated or updated.

append

boolean

If true, the content of this artifact should be appended to a previously sent artifact with the same ID.

lastChunk

boolean

If true, this is the final chunk of the artifact.

metadata

object (Struct format)

Optional. Metadata associated with the artifact update.