Skip to main content

Module message

Module message 

Source
Expand description

Message type hierarchy — flows through every agent and LLM call.

Based on Group 16 of the pre-plan. Every message has content, optional id, optional name, and provider-specific metadata passthrough.

Structs§

AiMessage
LLM output — contains tool calls, usage metadata, provider metadata
HumanMessage
User input — can contain text, images, audio, files (multimodal)
InputTokenDetails
InvalidToolCall
Malformed tool call — LLM tried but failed schema validation
OutputTokenDetails
SystemMessage
Instructions injected before conversation
ToolCall
Structured tool invocation request from LLM
ToolMessage
Result of a tool execution — must match tool_call_id from AiMessage
UsageMetadata
Token usage from a single LLM call

Enums§

ContentBlock
Content block types for multimodal messages
Message
Top-level message enum — all message types the system handles.
MessageContent
Message content — either plain text or multimodal content blocks

Constants§

REMOVE_ALL_MESSAGES
Sentinel value to clear a message list entirely