Glossary · A2A concepts

Part (A2A)

The smallest unit of content in an A2A message or artifact. Each part holds text, inline file bytes, a file URL, or structured JSON data.

A part is the smallest unit of content inside an A2A Message or Artifact, and it holds exactly one of four content types: text, raw file bytes, a file URL, or structured data. Several parts in one message let an agent send text, files and data together.

Content types. In a2a.proto, Part defines a oneof with four members:

  • text: a string.
  • raw: file bytes, base64-encoded in JSON.
  • url: a URL that points to file content.
  • data: any JSON value, such as an object, array, string, number, boolean or null.

Any part may also set mediaType (for example text/plain, application/pdf or application/json), filename and metadata.

Illustrative parts, one of each type:

[
  {"text": "Please check the attached invoice against the order."},
  {"url": "https://files.example.com/inv-2291.pdf", "filename": "inv-2291.pdf", "mediaType": "application/pdf"},
  {"raw": "SGVsbG8sIHdvcmxkIQ==", "filename": "note.txt", "mediaType": "text/plain"},
  {"data": {"orderId": "PO-5518", "currency": "CAD"}, "mediaType": "application/json"}
]

The v1.0 discriminator change. In v1.0 the member name itself identifies the part type. Version 0.3 used an explicit kind field and nested file content in a file object, and Appendix A.2.1 of the specification lists the switch as a breaking change. A v0.3 text part looked like this:

{"kind": "text", "text": "Please check the attached invoice against the order."}

Media types and errors. Agents advertise the media types they accept and produce through the Agent Card’s defaultInputModes and defaultOutputModes, and through each skill’s inputModes and outputModes. A client can list the output types it accepts in acceptedOutputModes when it sends a message. If a part’s media type is not supported by the agent or the skill, the agent returns ContentTypeNotSupportedError, which is JSON-RPC code -32005.

Sources

  1. A2A protocol definition (a2a.proto): Part (accessed )
  2. A2A Protocol Specification, Appendix A.2.1: Kind Discriminator Removed (accessed )
  3. A2A Protocol Specification, section 3.3.2: Error Handling (accessed )
  4. A2A documentation: Core Concepts (Messages and Parts) (accessed )