Hey all, is there any easy way to determine the identity of an agent you dispatch?
For example - let's say I dispatch agent A by name (explicit dispatch)
I don't have any way to correlate the next participant joined event I get with the dispatch I made. If I'm missing something and there is infact a way to get that info, let me know!
crooked-dawn-11536
10/27/2025, 5:56 PM
For context this is the agent dispatch request I make
req := &livekit.CreateAgentDispatchRequest{
Room: roomName,
AgentName: assignedAgentName,
Metadata: metadataString,
}
None of the attributes in participant_joined tell me if the agent that joined is the one that I dispatched.
l
lively-winter-88668
10/28/2025, 8:34 AM
I believe your best bet is to include the agent name in the metadata (JSON), then it will be available through the JobContext
c
crooked-dawn-11536
10/29/2025, 6:23 PM
Sure, but that is available on the agent's job context. The server that handles these dispatches and processes webhooks still doesn't know which identity to correlate with the dispatch unless the agent communicates that on every startup (which seems unnecessary)