Skip to main content

Overview

Bus messages are the communication primitives for the multi-agent framework. They are organized into two priority levels:
  • Data messages (BusDataMessage): Normal-priority messages for routine communication.
  • System messages (BusSystemMessage): High-priority messages that preempt normal messages in subscriber queues (e.g. cancel, errors).
Some messages also implement BusLocalMessage, meaning they stay on the local bus and are never forwarded to remote buses.

Base Types

Common Fields

All messages inherit these fields from BusMessage:

Frame Transport

BusFrameMessage

Pipeline Commands

BusTTSSpeakMessage

Agent Lifecycle

BusActivateWorkerMessage

BusEndMessage / BusEndWorkerMessage

BusCancelMessage / BusCancelWorkerMessage

Registry & Errors

BusAddWorkerMessage

BusWorkerRegistryMessage

BusWorkerReadyMessage

BusWorkerErrorMessage / BusWorkerLocalErrorMessage

Job Messages

BusJobRequestMessage

BusJobResponseMessage / BusJobResponseUrgentMessage

BusJobUpdateMessage / BusJobUpdateUrgentMessage

BusJobUpdateRequestMessage

BusJobCancelMessage

Job Streaming

BusJobStreamStartMessage / BusJobStreamDataMessage / BusJobStreamEndMessage

UI Messages

These carriers are the on-the-bus shape of the UI Worker protocol, exchanged between a UIWorker and the PipelineWorker that owns the transport. They are not the on-the-wire format the client sees — that is the RTVI User Interface protocol. When RTVI is enabled, PipelineWorker translates between the two: its on_ui_message handler republishes inbound client messages onto the bus, and its on_bus_message handler turns outbound carriers into RTVI frames. They live in the bus layer (rather than alongside UIWorker) because both PipelineWorker (in pipecat.pipeline) and UIWorker (in pipecat.workers) reference them, and pipeline must not import from workers. All subclass BusUIDataMessage.

BusUIEventMessage

| Field | Type | Default | Description | | ------------ | ----- | ------- | -------------------------------- | -------------------------- | | source | str | | Publisher name | | target | str | None | None | Target worker name, or all | | event_name | str | "" | App-defined event name | | payload | Any | None | App-defined payload (schemaless) |

BusUICommandMessage

| Field | Type | Default | Description | | -------------- | ----- | ------- | ------------------------------ | -------------- | | source | str | | Publishing worker name | | target | str | None | None | Target, or all | | command_name | str | "" | App-defined command name | | payload | Any | None | Command payload (a plain dict) |

BusUIJobGroupStartedMessage

| Field | Type | Default | Description | | ------------- | ---------- | ------- | ------------------------------------------- | ------------------------------------------- | | job_id | str | "" | Shared job-group identifier | | workers | list[str] | None | None | Names of the workers the work was sent to | | label | str | None | None | Optional human-readable label for the group | | cancellable | bool | True | Whether the client may request cancellation | | at | int | 0 | Epoch milliseconds when the group started |

BusUIJobUpdateMessage

BusUIJobCompletedMessage

BusUIJobGroupCompletedMessage