red-television-3815
05/20/2026, 2:34 PMtall-airline-16756
05/20/2026, 2:35 PMtall-airline-16756
05/20/2026, 2:35 PMroom.local_participant.perform_rpc() with the tool/event payload when the tool runs.
2. Frontend: register an RPC handler with localParticipant.registerRpcMethod() to receive the payload and update UI or trigger client actions.
Why RPC
• Designed for agent→frontend function calls and structured data delivery.
• Works well for tool calls that should trigger immediate UI behavior.
If you want alternatives or implementation examples, do you prefer a short code snippet for the agent (JS/TS or Python) or the frontend (web SDK)?
Sources: Forwarding to the frontend | LiveKit Documentation | Creating and Publishing Custom Metrics, with interactive elements