class LittleGhost::Message

A Message carries one participant’s contribution to an agent conversation. Its content can combine text, attachments, tool activity, and model reasoning.

Content is normalized into Content blocks held in a frozen Array. Strings become Content::Text blocks, and hashes use the serialized content shape accepted by Content.normalize. Nested values supplied by the caller are retained rather than defensively copied.

message = LittleGhost::Message.new(role: :user, content: "Hello")
message.text # => "Hello"