MessageSerializer
Abstract base class for bus message serialization. Network bus implementations use aMessageSerializer to convert messages to bytes for transmission and reconstruct them on the receiving end.
Methods
serialize
Returns: The serialized bytes.
deserialize
Returns: The reconstructed
BusMessage, or None if deserialization fails.
JSONMessageSerializer
Serialize bus messages as JSON with pluggable type adapters. Handles JSON-native types, enums, bytes, dataclasses, and any type with a registeredTypeAdapter.
Adapters for common Pipecat types (LLMContext, ToolsSchema) are registered by default.
RedisBus and the proxy agents.