OptionalchatOptionalcontextThe retrieved context the answer was generated from.
Copied onto the answer as context.
OptionaldocumentThe Agents API's own list of ids for the documents behind the answer. The SDK never reads it; matches is what it keeps on the message.
OptionalmatchesThe knowledge citations behind the answer.
Copied onto the answer as matches.
OptionalresultThe agent's answer.
Empty or absent when the answer is delivered as it is generated instead, which is what streaming modes do; the SDK then adds no message for it and the text arrives through onNewMessage.
OptionalvideoId of the video generated for the answer, when the server reported one.
What the Agents API answers a chat request with.
Returned by chat(). The SDK has already added the answer to the transcript by the time you get it, so most applications render onNewMessage instead and use this only for the fields that never reach a Message. Expressive (V4) agents chat over the data channel rather than over the Agents API — except in ChatMode.Playground — so for them the object is empty and the answer arrives through the callback.