Skip to main content

Module message

Module message 

Source
Expand description

Message types for the A2A protocol.

A Message is the fundamental communication unit between a client and an agent. Each message has a MessageRole ("ROLE_USER" or "ROLE_AGENT") and carries one or more Part values.

§Part structure (v1.0)

Part uses JSON member name as discriminator per v1.0 spec:

  • {"text": "hello"}
  • {"raw": "base64...", "filename": "f.png", "mediaType": "image/png"}
  • {"url": "https://...", "filename": "f.png", "mediaType": "image/png"}
  • {"data": {...}}

Structs§

FileContent
Content of a file part.
Message
A message exchanged between a client and an agent.
MessageId
Opaque unique identifier for a Message.
Part
A content part within a Message or crate::artifact::Artifact.

Enums§

MessageRole
The originator of a Message.
PartContent
The content of a Part, discriminated by JSON member name per v1.0 spec.