blue-ability-56213
12/25/2025, 2:57 PMtall-airline-16756
12/25/2025, 2:57 PMtall-airline-16756
12/25/2025, 2:57 PMpublish_on_behalf.
publish_on_behalf is used to link a media-publishing participant (an "avatar worker") to an agent (the backend agent session) that it represents. Instead of the agent session publishing audio/video directly, the avatar worker publishes those tracks and sets lk.publish_on_behalf to the agent's identity. This lets clients:
• Associate the avatar worker’s audio/video with the correct agent.
• Keep avatar rendering and media publication separated from the agent backend (better sync, lower latency).
• Let frontends detect agent media by checking participants of kind agent whose lk.publish_on_behalf equals the agent identity.
If you want, I can show how to detect these participants in your client code or point to the React hook (useVoiceAssistant) that retrieves the agent and its tracks automatically.
Sources: Virtual avatar plugins | LiveKit Docs