aloof-scooter-47164
09/17/2025, 9:13 AMtall-airline-16756
09/17/2025, 9:13 AMtall-airline-16756
09/17/2025, 9:14 AMaloof-scooter-47164
09/17/2025, 9:15 AMtall-airline-16756
09/17/2025, 9:15 AMaloof-scooter-47164
09/17/2025, 9:19 AMtall-airline-16756
09/17/2025, 9:20 AMaloof-scooter-47164
09/17/2025, 9:21 AMtall-airline-16756
09/17/2025, 9:21 AMsendText() method in the LiveKit client SDKs to send a message to the room. For example, in JavaScript, it looks like this:
await room.localParticipant.sendText('Hello', { topic: 'lk.chat' });
• The agent will receive your message as long as they're subscribed to the same topic (like lk.chat).
• If you're coming from a server or an external service: You can use the LiveKit server API to send data to the room. Here's a Python example:
send_request = room_proto.SendDataRequest(
room='room_name',
data=b'Hello',
kind=DataPacket.Kind.RELIABLE,
topic='lk.chat'
)
await lkapi.room.send_data(send_request)
• And if you want, you can even target specific participants — like the agent — by their identity.
On the agent's side, they just need to listen on the matching topic through the SDK to receive your messages. If you have any questions or want to walk through this together, feel free to ask!
Sources: VoiceAgent/Chat/Send/LocalMessageSender.swift | complex-agents/role-playing/role_playing_frontend/components/session-view.t... | Text and transcriptions | LiveKit Docsaloof-scooter-47164
09/17/2025, 9:22 AMtall-airline-16756
09/17/2025, 9:23 AM