Message#
Choose message roles and distinguish model input from stored history. See the guide.
- class zett_agent.messages.Message(*, attributes=<factory>, persist=True, include_in_messages=True)[source]#
Common base for user, internal agent, assistant, system, and tool roles.
attributescarries application-owned information attached to one message. Provider adapters ignore it unless they explicitly document another mapping.persistcontrols whether Raw Log subscribers should store the message.include_in_messagescontrols whether persisted history is restored intoAgentState.messagesand therefore sent on later model requests.Note
Request-level
metadataandtagslive onAgentRunContextand are persisted beside Raw Log records. They are intentionally different from per-messageattributes.See also
RawMessageRecordis the persisted message envelope.- Parameters:
attributes (dict[str, Any])
persist (bool)
include_in_messages (bool)
- attributes: dict[str, Any]#
Application-owned per-message information. Provider adapters do not send these values to model APIs unless an adapter explicitly defines a mapping.
- persist: bool#
Whether the runtime’s persistence subscribers should store this message.
- include_in_messages: bool#
Whether restored history should include this message in model context.