OptionalagentAssociated agent run ID for tracking
Content of the message, can be any string or an array of content blocks.
OptionalelapsedCurrent elapsed time during streaming
OptionalerrorError message if processing failed
OptionalexecutionExecution data for agent runs
OptionalexecutionTotal execution time for AI-generated messages
Unique identifier for this message
OptionalisWhether this message is currently being streamed
OptionalmetadataOptional metadata for the message. The type can be specified via the generic parameter. This allows different consumers to attach their own typed metadata without modifying the core ChatMessage type.
OptionalpayloadPayload data from agent execution to display separately
OptionalpayloadWhether the payload section is collapsed
OptionalrawOriginal unprocessed content from the AI model
Role of the message in the conversation.
OptionalshowWhether JSON raw section is expanded in collapsible view
OptionalshowWhether to display raw content instead of processed content
OptionalstreamingAccumulated content during streaming (temporary)
OptionalstreamingTimestamp when streaming started (for elapsed time calculation)
Timestamp when the message was created
OptionaltoolFor assistant turns that called tools: the calls the model made, so a prior tool-calling
turn round-trips back to the provider on the next request. Every provider requires the
assistant's own call turn to be present in history before the matching results.
Set this from ChatCompletionMessage.toolCalls when appending the model's reply to
the conversation; the tool turn that answers it follows immediately.
Enhanced chat message interface extending the base ChatMessage from @memberjunction/ai. Includes additional properties for streaming, timing, error handling, and content management.