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
- Human
Message - User input — can contain text, images, audio, files (multimodal)
- Input
Token Details - Invalid
Tool Call - Malformed tool call — LLM tried but failed schema validation
- Output
Token Details - System
Message - Instructions injected before conversation
- Tool
Call - Structured tool invocation request from LLM
- Tool
Message - Result of a tool execution — must match tool_call_id from AiMessage
- Usage
Metadata - Token usage from a single LLM call
Enums§
- Content
Block - Content block types for multimodal messages
- Message
- Top-level message enum — all message types the system handles.
- Message
Content - Message content — either plain text or multimodal content blocks
Constants§
- REMOVE_
ALL_ MESSAGES - Sentinel value to clear a message list entirely