Message¶
The standard message envelope passed between agents and through the runtime.
See Messaging for routing semantics and payload rules.
civitas.messages.Message(id=_uuid7(), type='message', sender='', recipient='', correlation_id=None, reply_to=None, payload=dict(), timestamp=_now(), trace_id='', span_id='', parent_span_id=None, attempt=0, priority=0)
dataclass
¶
Standard message envelope for all inter-agent communication.
Every message in Civitas is wrapped in this envelope. The envelope carries routing and observability metadata. The payload carries application data.
to_dict()
¶
Convert to a plain dict for serialization.
Includes schema_version so receivers can detect and handle schema
evolution. Unknown keys in received dicts are filtered by from_dict.
Source code in civitas/messages.py
from_dict(data)
classmethod
¶
System message types¶
Messages with types prefixed _agency. are reserved for runtime internals.
Application code must not use this prefix.