Message Body Structure
Multi-modal structure for data exchange
This is an Alpha version still in active development; its structure, interfaces, and functionality are changing frequently as the design evolves. Join the GitHub discussions to help shape it.
đź’¬ Discussion: [PROPOSAL] Message body structure
đź’¬ Discussion: [PROPOSAL] Communication structure
đź’¬ Discussion: Agentic components - citations, artifacts, CoT, etc.
This page describes the core “message body” structure used in ACP.
Introduction
A message body consists of a series of parts, which may be “text”, “image”, or “artifact”, like int this example:
"text"
parts provide theircontent
inline"image"
parts provide acontentUrl
where the content can be retrieved"artifact"
parts either provide acontentUrl
like images, or they can be inlined by definingcontent
,contentType
(MIME type), andcontentEncoding
(which may be"plain"
or"base64"
)
Parts form a full message by interleaving textual content with images and artifacts (which may serve as attachments, sources, recorded tool calls, etc.).
Next we provide a more formal specification of this structure, accompanied by more examples.
MessageBody
MessageBody
consists of parts, each representing either text, an image, or an artifact. Text parts contain inline content, while images reference external content via a URL. Artifacts can either reference external content via a URL or contain inline content with an encoding. Only artifacts have names.
A message is an ordered list of parts. Text and images typically represent the main content, while artifacts serve as attachments, metadata, or additional resources.
MessageBodySchema
MessageBodySchema
defines the types of parts expected in a message. It is simply a list of supported types from the set ["text", "image", "artifact"]
. A message is valid if all its parts are of a type listed in the schema.
Examples
Chat agent
A simple chat agent that only supports text responses:
Example message:
Multi-modal chat agent
A chat agent that can send text and images:
Example message:
Software-writing agent
An agent that generates text responses along with downloadable files:
Example message:
Researcher agent
An agent that provides a detailed write-up with images and references:
Example message:
Why keep it simple?
Many schema formats, such as JSON Schema, introduce unnecessary complexity. This proposal keeps the structure minimal while still covering most use cases efficiently.