TheDocumentation Index
Fetch the complete documentation index at: https://daily-mb-ui-agent.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 PipelineTask. 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 propagates immediately
through the pipeline and is not affected by interruptions or queuing.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 Agent Protocol
The processor recognizes five first-class RTVI message types for UI Agent traffic —ui-event, ui-snapshot, ui-cancel-task (inbound from client) and ui-command, ui-task (outbound to client). The full wire format is documented in the RTVI standard.
For the recommended higher-level SDK flow, see the UI Agent guide. This page focuses on direct RTVIProcessor integrations.
Receiving UI messages
Inboundui-event, ui-snapshot, and ui-cancel-task messages fire the on_ui_message event handler with the parsed envelope. The same dispatch also pushes a typed pipeline frame (RTVIUIEventFrame, RTVIUISnapshotFrame, or RTVIUICancelTaskFrame) so processors and observers downstream can react at the pipeline level — pick whichever shape fits your code path.
pipecat-subagents subscribe to it from their UI bridge and route the parsed envelopes onto an agent bus.
Sending UI messages
Outboundui-command and ui-task messages flow through dedicated pipeline frames. Push RTVIUICommandFrame from any FrameProcessor and the RTVIObserver wraps it into the ui-command envelope on the wire:
RTVIUITaskFrame carrying one of the four UITask*Data discriminated-union members (UITaskGroupStartedData, UITaskUpdateData, UITaskCompletedData, UITaskGroupCompletedData). See RTVI Frames for the frame definitions and the RTVI standard for the wire format.