A2aEvent

sealed class A2aEvent

A typed piece of a server response. A response envelope can produce several events; they arrive in the order the server sent them. Every event carries the ids of its task and conversation (empty when the envelope had none).

Artifact events come from the action in Artifact.metadata["action"]; see ArtifactAction. DeviceActionEvent marks the events after which the server pauses the task until the client reports the outcome.

Inheritors

Types

Link copied to clipboard
data class ChatText(val taskId: String, val contextId: String, val artifactId: String, val text: String, val append: Boolean, val lastChunk: Boolean) : A2aEvent

A piece of the agent's prose (PRESENT_MESSAGE). See ChatTextAssembler to join chunks.

Link copied to clipboard

Events for actions the client carries out on the device. The server pauses the task after them and waits for A2aSession.sendActionResult.

Link copied to clipboard
data class DisplayContentDetails(val taskId: String, val contextId: String, val details: ContentDetails, val artifactId: String = "") : A2aEvent.DeviceActionEvent

DISPLAY_CONTENT_DETAILS: show the details of one title. Report DISPLAYED (or ERROR when it cannot be shown) with A2aSession.sendActionResult; the acknowledgement must not dismiss the details.

Link copied to clipboard
data class Favourited(val taskId: String, val contextId: String) : A2aEvent

FAVOURITED: signal only. The server does not emit it yet.

Link copied to clipboard
data class PausePlayback(val taskId: String, val contextId: String, val artifactId: String = "") : A2aEvent.DeviceActionEvent

PAUSE: pause the current playback.

Link copied to clipboard
data class PowerOff(val taskId: String, val contextId: String, val artifactId: String = "") : A2aEvent.DeviceActionEvent

POWER_OFF: power the device off.

Link copied to clipboard
data class PowerOn(val taskId: String, val contextId: String, val artifactId: String = "") : A2aEvent.DeviceActionEvent

POWER_ON: power the device on.

Link copied to clipboard
data class Recording(val taskId: String, val contextId: String) : A2aEvent

RECORDING: signal only. The server does not emit it yet.

Link copied to clipboard
data class RenderContent(val taskId: String, val contextId: String, val artifactId: String, val artifactName: String, val rail: ContentRail) : A2aEvent

A rail of content to render (DISPLAY_CONTENT).

Link copied to clipboard
data class ResumePlayback(val taskId: String, val contextId: String, val artifactId: String = "") : A2aEvent.DeviceActionEvent

RESUME: resume the paused playback.

Link copied to clipboard
data class StartPlayback(val taskId: String, val contextId: String, val contentId: String, val artifactId: String = "") : A2aEvent.DeviceActionEvent

PLAYBACK: play contentId on the device.

Link copied to clipboard
data class TaskStatus(val taskId: String, val contextId: String, val state: A2aTaskState, val timestampMillis: Long?) : A2aEvent

Lifecycle change. INPUT_REQUIRED follows an action that awaits the client.

Link copied to clipboard
data class Unknown(val taskId: String, val contextId: String, val reason: String, val data: Any?) : A2aEvent

A payload that could not be understood (no action, or a required field missing).

Link copied to clipboard
data class VolumeDown(val taskId: String, val contextId: String, val artifactId: String = "") : A2aEvent.DeviceActionEvent

VOLUME_DOWN: lower the volume.

Link copied to clipboard
data class VolumeUp(val taskId: String, val contextId: String, val artifactId: String = "") : A2aEvent.DeviceActionEvent

VOLUME_UP: raise the volume.

Properties

Link copied to clipboard
abstract val contextId: String
Link copied to clipboard
abstract val taskId: String