SystemMessage#

Choose message roles and distinguish model input from stored history. See the guide.

class zett_agent.messages.SystemMessage(*, attributes=<factory>, persist=True, include_in_messages=False, content)[source]#

Application instructions placed before conversational messages.

System messages are recorded in the Raw Log for observability but are not restored into later model context by default. Applications rebuild current instructions for every request, so persisting the same instruction must not accumulate stale copies in AgentState.messages. Set include_in_messages=True when a system message should also be replayed.

Examples

Insert durable behavior during an extension’s on_state hook:

context.add_message(
    SystemMessage(content="Answer with concise, verifiable steps."),
    index=0,
)
Parameters:
  • attributes (dict[str, Any])

  • persist (bool)

  • include_in_messages (bool)

  • content (str)

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.