A2A defines how agents exchange content during a task.
Messages
A message is one turn of communication, with a role — from the user or client side, or from the agent — and one or more parts.
Parts
Parts carry content of different types:
- Text parts: plain or formatted text.
- File parts: files, either inline as encoded bytes or referenced by URI.
- Data parts: structured JSON, useful for forms and machine-readable results.
This lets agents negotiate formats: a client might accept text only, or prefer structured data.
Artifacts
Artifacts are the outputs a task produces — a report, an image, a dataset, a booking confirmation. They're made of parts too, and can be streamed in chunks for large outputs.
Messages Versus Artifacts
Messages carry the conversation: instructions, questions, status explanations. Artifacts carry deliverables.
Good Practice
- Use data parts for results other programs will consume.
- Reference large files by URI rather than inlining them.
- Describe what artifacts contain so the client agent can use them correctly.