square-activity-46232
04/13/2026, 9:53 PMtall-airline-16756
04/13/2026, 9:53 PMtall-airline-16756
04/13/2026, 9:53 PMupdate_room_metadata() / updateRoomMetadata()).
• Agents/clients typically observe changes either by:
◦ Receiving a data message or custom signal broadcast when metadata changes, or
◦ Getting webhook notifications on the server side and then informing connected agents/clients.
• There is no confirmed dedicated real-time room-metadata event for agents; use data messages or webhooks to propagate changes to agents in real time.
Example pattern: agent that receives room-metadata updates
1. Backend: update room metadata via server SDK
# (server-side) update room metadata
await api_client.room.update_room_metadata(
room="my-room",
metadata='{"session_phase":"recording"}'
)
# After updating, broadcast a small data message (optional) to notify participants
1. Agent: connect to the room and listen for data messages (or react to webhook-triggered messages)
async def my_agent(ctx: JobContext):
await ctx.connect(auto_subscribe=True)
# read initial metadata
current_metadata = ctx.room.metadata
print("initial metadata:", current_metadata)
# listen for data messages (used to notify about metadata changes)
@ctx.room.on("data_received")
def on_data(sender, payload, kind):
# parse payload that indicates metadata update
if payload.get("type") == "room_metadata_updated":
new_meta = payload.get("metadata")
print("room metadata updated:", new_meta)
# react to the new metadata here
Alternative approach (server -> agent via webhook)
• Server receives webhook like room_updated (or similar).
• Server forwards the change to agents via an internal API or emits a data message into the room so agents/clients receive it.
If you want, I can:
• Provide a full runnable example in your preferred language (Node, Python, or Ruby).
• Show how to format the data message payload and secure the notification flow.
Which language and delivery method do you prefer: direct data messages inside the room, or webhook -> server-forwarded notifications to agents?
Sources: client-sdk-js | livekit/livekit_composite | DeepWiki | server-sdk-ruby | livekit/livekit_composite | DeepWiki | Job lifecycle | LiveKit Documentation, with interactive elements