GatewayEvent
Defined in the protocols module.AI Agent A gateway event with metadata. Attributes: type: The event type data: Event payload event_id: Unique event identifier timestamp: Event creation time source: Source identifier (agent_id, client_id, etc.) target: Target identifier (optional, for directed events) sequence: Monotonic sequence number for gap detection (optional) Wire Protocol Extensions: When events are sent over the gateway, additional fields are added:
- seq: Top-level monotonic sequence number for gap detection
- cursor: Event cursor position (also stored in data[‘cursor’])
- cursor: Current head cursor position
- oldest_cursor: Oldest event still in buffer
- resync_required: True if requested ‘since’ is below oldest_cursor
Properties
Union[EventType, str]
No description available.
Dict[str, Any]
No description available.
str
No description available.
float
No description available.
Optional[str]
No description available.
Optional[str]
No description available.
Optional[int]
No description available.
Internal & Generic Methods
Internal & Generic Methods
- from_dict: Create from dictionary.
- to_dict: Convert to dictionary for serialization.
Source
View on GitHub
praisonaiagents/gateway/protocols.py at line 717
