Member Junction
    Preparing search index...

    Represents a media output that an agent has explicitly promoted to its outputs. This is the interface used in ExecuteAgentResult.mediaOutputs.

    Media can come from two sources:

    1. Promoted from a prompt run (has promptRunMediaId)
    2. Generated directly by agent code (has data or url)

    3.1.0

    interface MediaOutput {
        data?: string;
        description?: string;
        durationSeconds?: number;
        height?: number;
        label?: string;
        metadata?: Record<string, unknown>;
        mimeType: string;
        modality: MediaModality;
        promptRunMediaId?: string;
        refId?: string;
        url?: string;
        width?: number;
    }
    Index

    Properties

    data?: string

    Base64 encoded data (only if NOT from prompt run)

    description?: string

    Agent notes describing what this media represents. Used for internal tracking, debugging, and can be persisted for audit purposes.

    3.1.0

    durationSeconds?: number

    Duration in seconds (for audio/video)

    height?: number

    Height in pixels (for images/video)

    label?: string

    Agent-provided label for UI display

    metadata?: Record<string, unknown>

    Provider-specific metadata

    mimeType: string

    MIME type of the media (e.g., 'image/png', 'audio/mp3')

    modality: MediaModality

    The modality type

    promptRunMediaId?: string

    Reference to source AIPromptRunMedia (if promoted from prompt execution)

    refId?: string

    Placeholder reference ID for the ${media:xxx} pattern. Used to look up media when resolving placeholders in agent output.

    3.1.0

    url?: string

    URL if available (some providers return URLs)

    width?: number

    Width in pixels (for images/video)