Package:
@hexos/react-coreFrontend representation of a message in the conversation, with structured parts for rich rendering.
Includes a parts array for granular rendering of tool calls, reasoning blocks, and images.
The metadata field allows attaching arbitrary data for custom rendering.
Related: MessagePart defines part types, messagesAtom stores the array, MessageBubble renders individual messages.
interface AgentMessage {
id: string;
role: 'user' | 'assistant' | 'system' | 'tool';
content: string;
createdAt: Date;
agentId?: string;
metadata?: Record<string, unknown>;
parts?: MessagePart[];
}