Multimodal Inputs
AGUIUserMessage.Content accepts either plain text or an ordered array of
multimodal content parts through the AGUIUserContent union.
User Message Content
The AG-UI wire model for user messages is content: string | InputContent[].
In .NET, that is represented by AGUIUserContent.
AGUIUserContent has implicit conversions from string,
List<AGUIInputContent>, and AGUIInputContent[], supports collection
expressions, and implements IReadOnlyList<AGUIInputContent> for normalized
reads. When the stored value is a string, the read-only list facade exposes it
as a single AGUITextInputContent.
Input Content Types
All content parts derive from AGUIInputContent and use the JSON type
discriminator.
| C# type | JSON type | Properties |
|---|
AGUITextInputContent | text | text |
AGUIImageInputContent | image | source, optional metadata |
AGUIAudioInputContent | audio | source, optional metadata |
AGUIVideoInputContent | video | source, optional metadata |
AGUIDocumentInputContent | document | source, optional metadata |
AGUIBinaryInputContent | binary | mimeType, optional id, url, data, filename |
Text
| C# property | JSON field | Type | Description |
|---|
Type | type | "text" | Content discriminator |
Text | text | string | Text content |
Images, audio, video, and documents all derive from AGUIMediaInputContent.
| C# property | JSON field | Type | Description |
|---|
Type | type | "image", "audio", "video", or "document" | Content discriminator |
Source | source | AGUIInputContentSource | Data or URL source |
Metadata | metadata | JsonElement? | Optional modality-specific metadata |
Binary
AGUIBinaryInputContent represents an arbitrary binary input part.
| C# property | JSON field | Type | Description |
|---|
Type | type | "binary" | Content discriminator |
MimeType | mimeType | string | MIME type |
Id | id | string? | Optional binary identifier |
Url | url | string? | Optional URL for the binary |
Data | data | string? | Optional inline base64 data |
Filename | filename | string? | Optional file name |
Source Types
Media input parts use AGUIInputContentSource, a discriminator-based hierarchy
with JSON field type.
Data Source
Use AGUIInputContentDataSource for inline base64 payloads. mimeType is
required.
| C# property | JSON field | Type | Description |
|---|
Type | type | "data" | Source discriminator |
Value | value | string | Inline base64 payload |
MimeType | mimeType | string | Payload MIME type |
URL Source
Use AGUIInputContentUrlSource for HTTP(S) URLs or data URLs. mimeType is
optional.
| C# property | JSON field | Type | Description |
|---|
Type | type | "url" | Source discriminator |
Value | value | string | URL or data URL |
MimeType | mimeType | string? | Optional MIME type |
Common Use Cases
Visual QA
Audio Transcription
Use plain string Content for simple text-only turns. Use multimodal parts
when order matters or when the user message includes media alongside text.