Skip to main content

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.

Text

Media Parts

Images, audio, video, and documents all derive from AGUIMediaInputContent.

Binary

AGUIBinaryInputContent represents an arbitrary binary input part.

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.

URL Source

Use AGUIInputContentUrlSource for HTTP(S) URLs or data URLs. mimeType is optional.

Common Use Cases

Visual QA

Audio Transcription

Mixed Media Comparison

Use plain string Content for simple text-only turns. Use multimodal parts when order matters or when the user message includes media alongside text.