Why it matters
Rich message content unlocks realistic agent use cases: code review with file attachments, data analysis with structured inputs. Understanding the message model shapes what your agents can do.
Advertisement
The architecture
Part types: text (string), file (bytes with MIME), data (structured JSON). Messages combine parts.
Extensibility: new part types can be defined per domain.
Advertisement
How it works end to end
File handling: inline for small files (base64), URI reference for large. Server-side agents fetch by URI.
Structured data: JSON with optional schema reference. Enables type-safe parameter passing.
Multi-modal: image, audio, video parts extend the model.