TheDocumentation Index
Fetch the complete documentation index at: https://daily-docs-pr-4533.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
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 task.rtvi:
enable_rtvi=False.
Readiness Protocol
Client Ready State
Clients indicate readiness by sending aclient-ready message, triggering the on_client_ready event in the processor:
The processor validates the client’s RTVI protocol version during the
handshake. 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:- 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:- 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:- LLM requests a function call
- Processor notifies client with
llm-function-callmessage - Client executes function and returns result
- Result is passed back to LLM via
FunctionCallResultFrame - Conversation continues
Error Handling
Send error messages to clients:- 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
AnyFrameProcessor 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:
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 theon_ui_message event handler:
| Wire message | Frame pushed downstream | on_ui_message payload |
|---|---|---|
ui-event | RTVIUIEventFrame | UIEventMessage |
ui-snapshot | RTVIUISnapshotFrame | UISnapshotMessage |
ui-cancel-job-group | RTVIUICancelJobGroupFrame | UICancelJobGroupMessage |
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.