Normandy.Components.Message
(normandy v0.6.2)
View Source
Represents a single message in agent conversation history.
The :content field is intentionally permissive so callers can pass:
- a plain
String.t()(e.g. simple chat text, system prompts); - a single
struct()(e.g. an I/O schema orToolResult, serialized downstream viaNormandy.Components.BaseIOSchema); - a list of content blocks (
Normandy.Components.ContentBlock.*) for multimodal messages combining text, images, and documents.
The downstream LLM adapter (e.g. Normandy.LLM.ClaudioAdapter) inspects
the shape and translates it to the provider's on-the-wire format.
The schema declares content as :any rather than a narrower union:
Message is not an io_schema, so no JSON schema is generated for this
field and no LLM ever consumes its type. The permissive runtime type
pairs with the precise @type t above — the adapter validates on its
way out, not here.