Skip to main content

MessageIn

One message from the end user: the text of the turn, plus optional media.

textTextrequired

What the end user says in this turn.

Possible values: non-empty and <= 32000 characters

attachments object[]nullable

Media to attach to this turn (up to 10 items). null or an empty list means no media.

Possible values: <= 10

  • Array [
  • file_idstring<uuid>nullable

    Identifier of an owned file created via POST /v1/files. Provide exactly one of file_id or file_data.

    file_dataFile Datanullable

    Base64-encoded file bytes (a data:…;base64, prefix is accepted and ignored). Provide exactly one of file_id or file_data.

  • ]
  • a2ui_action object

    Set when the user sent this message by acting on an a2ui surface (a button tap, a form submit): the renderer's a2ui action message, as is. text still holds what the user sees themselves send, such as the button's label. Only an a2ui session takes one.

    anyOf

    A UI action from an a2ui surface: the renderer's a2ui action message, as is.

    versionVersionrequired

    The a2ui protocol version: v1.0.

    Constant value: v1.0
    action objectrequired

    What the user did on an a2ui surface, as the renderer reports it.

    nameNamerequired

    The name of the component's action.event.

    Possible values: <= 64 characters, Value must match regular expression ^[^\x00-\x1f\x7f\u0085\u2028\u2029]+$

    surfaceIdSurfaceidrequired

    The surfaceId of the surface the component is on.

    Possible values: <= 200 characters, Value must match regular expression ^[^\x00-\x1f\x7f\u0085\u2028\u2029]+$

    sourceComponentIdSourcecomponentidrequired

    The id of the component the user acted on.

    Possible values: <= 200 characters, Value must match regular expression ^[^\x00-\x1f\x7f\u0085\u2028\u2029]+$

    timestampTimestampnullable

    When the user acted (ISO 8601), as the renderer reports it.

    Possible values: <= 64 characters

    contextobject

    The context of the component's action.event with its data bindings resolved: the values the user picked or entered. At most 4000 characters as JSON, nested at most 8 levels deep.

    userMessageUsermessagenullable

    The component's action.event.userMessage. Taken and not used: text is what the user said.

    Possible values: <= 2000 characters

    metadataobjectnullable

    Client-side metadata the renderer attaches. Taken and not used; bounded like context.

    streamStream

    true to receive the task on this request: the response is a stream of the task's own frames, as the session's event stream sends them, from its first frame through its end frame — or for at most 10 minutes, like any event stream.

    Default value: false
    MessageIn
    {
    "text": "What should I pack for three days in Lisbon in March?"
    }