Skip to main content
The RTVIProcessor manages bidirectional communication between clients and your Pipecat application. It processes client messages, handles service configuration, executes actions, and coordinates function calls.

Initialization

RTVIProcessor is automatically added to your pipeline when you create a PipelineWorker. Access it via worker.rtvi:
To provide a custom processor (e.g., for Google RTVI):
To disable RTVI entirely, set enable_rtvi=False.

Properties

client_version

Returns the negotiated client protocol version as [major, minor, patch]. Defaults to [0, 0, 0] until the client sends a client-ready message.

Readiness Protocol

Client Ready State

Clients indicate readiness by sending a client-ready message, triggering the on_client_ready event in the processor:
The processor validates the client’s RTVI protocol version during the handshake. The server protocol version is 2.1.0. Clients with major version 2 are fully compatible. Clients with major version 1 (deprecated) are still supported with the legacy bot-output format. If the client’s major version doesn’t match the server’s protocol version, an error response is sent but the connection continues. Check server logs for version compatibility warnings.

Bot Ready State

The server must mark the bot as ready before it can process client messages:
When marked ready, the bot sends a response containing:
  • RTVI protocol version
  • Current service configuration
  • Available actions

Services

Services represent configurable components of your application that clients can interact with.

Registering Services

Option Types

Services support multiple data types for configuration:
Option handlers receive:
  • The processor instance
  • The service name
  • The option configuration with new value

Actions

Actions are server-side functions that clients can trigger with arguments.

Registering Actions

Action Arguments

Actions can accept typed arguments from clients:

Function Calls

Handle LLM function calls with client interaction:
The function call process:
  1. LLM requests a function call
  2. Processor notifies client with llm-function-call message
  3. Client executes function and returns result
  4. Result is passed back to LLM via FunctionCallResultFrame
  5. Conversation continues

Error Handling

Send error messages to clients:
Error categories:
  • Configuration errors
  • Action execution errors
  • Function call errors
  • Protocol errors
  • Fatal and non-fatal errors

Bot Control

Manage bot state and handle interruptions:

Custom Messaging

Server messages let you push unsolicited data from the server to the client at any time — notifications, status updates, real-time results, etc. They are distinct from server responses, which reply to a specific client request (see Requesting Information from the Server).

Sending server messages

Any FrameProcessor in the pipeline can push an RTVIServerMessageFrame. The RTVIObserver picks it up and delivers it to the client:
RTVIServerMessageFrame is a SystemFrame, so it uses the high-priority SystemFrame lane, remains ordered with other SystemFrames, and is not discarded by interruptions.

Client-side handling

The message arrives at the client with the wire format { label: "rtvi-ai", type: "server-message", data: ... }. Handle it with the onServerMessage callback:
See Handling Custom Messages from the Server for more details and examples.

DTMF Input

The processor handles dtmf client messages for keypad input (e.g., phone menu navigation). Each dtmf message carries one or more keypad entries (0-9, *, #) as a list. The processor pushes one InputDTMFFrame per key, in order, downstream to the bot’s DTMF handling (e.g., a DTMFAggregator) exactly as a telephony transport’s rapid keypresses would arrive.
When a bot uses a DTMFAggregator, the aggregator accumulates keys and flushes them (on # or its idle timeout) into a transcription like "DTMF: 123#" that the LLM can react to.

UI Messaging

The processor handles the User Interface messages that let a server-side agent observe and drive the client GUI. Inbound UI messages from the client are turned into pipeline frames and surfaced via the on_ui_message event handler:
When you use UIWorker, PipelineWorker wires this up automatically (RTVI is enabled by default): inbound UI messages are republished onto the bus for the worker, and outbound ui-command / ui-job-group frames are translated by the RTVI Observer. You only handle on_ui_message directly when targeting the wire format from a single-LLM app without a UIWorker.