Overview
Similar to Participant metadata, Rooms also feature a metadata field for application-specific data which is visible to all participants.
Room metadata can only be set using the server APIs, but can be accessed by all participants in the room using the LiveKit SDKs.
To set room metadata, use the CreateRoom and UpdateRoomMetadata APIs.
To subscribe to updates, you must handle the RoomMetadataChanged event.
Size limits
Room metadata is limited to 64 KiB.
Reference large data by ID
If your app needs to share data that exceeds the size limit, such as a large agent system prompt or tool configuration, store the payload in your own database and pass its row ID (or any other lookup key) in room metadata. Room metadata is a single string, so use a JSON object like {"configId": "abc123"} to pass one or more identifiers. Each participant or agent reads the metadata and uses that ID to fetch the payload from your database when they join the session.