API
interface AssistantMessage<Output, ToolUnion extends AnyTool> {readonly attribution?: readonly Attribution[];readonly citations?: readonly Citation[];content?: Output;encryptedValue?: string;readonly id: string;metadata?: Metadata;reasoning?: string;readonly reasoningDetails?: readonly Readonly<ReasoningMessage>[];role: "assistant";readonly serverToolCalls?: readonly ServerToolCall[];readonly sources?: readonly ServerToolCallSource[];readonly subagentRunId?: string;toolCalls: ToolCall < ToolUnion > [];}@typeOutput@typeToolUnionAnyToolreadonly Attribution[]Attribution the provider requires an app to show with the answer.
readonly Citation[]Which sources the answer cites, and where.
OutputstringOpaque provider continuation data preserved across AG-UI runs. Hashbrown does not inspect or display this value.
stringThe canonical AG-UI message id. It is the same while the message streams and after it is committed.
MetadataProvider metadata preserved across AG-UI runs.
stringHuman-readable reasoning. When reasoningDetails is present, this value
is derived from the ordered records' nonempty content.
readonly Readonly<ReasoningMessage>[]Ordered AG-UI reasoning records, including opaque continuation data such
as encrypted values, subagent run IDs, and metadata. When present, these
records take precedence over reasoning.
'assistant'readonly ServerToolCall[]Tool calls the agent server executed itself, in the order the model made
them, as ServerToolCall records. Present only when the message carries
at least one.
readonly ServerToolCallSource[]Sources the answer drew on that came with no tool call.
stringThe subagent invocation that produced this message or requested this call. Calls inherit their enclosing assistant's owner when omitted.
ToolCall<ToolUnion>[]