AgentMessage#
Choose message roles and distinguish model input from stored history. See the guide.
- class zett_agent.messages.AgentMessage(*, attributes=<factory>, persist=True, include_in_messages=True, content)[源代码]#
Internal extension input, persisted as agent and sent as user to providers.
This is an instruction to the running agent, not model-generated output. Provider APIs have no agent role; adapters map it to user at the API boundary.
示例
An extension can request another model iteration without impersonating the user:
await context.publish( InternalMessageEvent(AgentMessage(content="Run the failing test and continue.")) )
参见
InternalMessageExtensionowns the request-local queue and processing limit for these messages.- 参数:
attributes (dict[str, Any])
persist (bool)
include_in_messages (bool)
content (str)