job metadata vs room metadata
# ask-ai
c
job metadata vs room metadata
t
Thanks for reaching out, faiq. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
The key differences between job metadata and room metadata in LiveKit are as follows: Job Metadata: • Job metadata is a freeform string field defined in the dispatch request and consumed in the entrypoint. • It is used to pass complex information such as user ID, name, and phone number using JSON or similar structured data. • It is specific to individual agent jobs and accessed through the JobContext. Room Metadata: • Room metadata is for application-specific data that is visible to all participants in a room. • It can only be set using the server APIs, such as the CreateRoom and UpdateRoomMetadata APIs, but can be accessed by all participants using the LiveKit SDKs. • It is ideal for room-wide state, configuration, and shared settings. In summary, job metadata is used for agent-specific customization during dispatch, while room metadata is used for sharing application state across all participants in a room. Sources: Job lifecycle | LiveKit Docs | Room metadata | LiveKit Docs | State synchronization
c
If I am setting a transfer number it should be done by room or job metadata?
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!
c
job_context.room.participants