silly-shampoo-77907
02/26/2025, 4:13 PMcurl --location '<https://myurl/twirp/livekit.SIP/RoomAgentDispatch>' \
--header 'Authorization: Bearer token' \
--header 'Content-Type: application/json' \
--data '{
"agent_name": "agent-name",
"room": "room-name",
"metadata": "my_job_metadata"
}
gray-monkey-83525
02/26/2025, 4:13 PMAgentDispatchService
API, which is accessible via the /twirp/livekit.AgentDispatchService/CreateDispatch
endpoint. Here's how you can structure your curl request:
curl --location 'https://your-livekit-url/twirp/livekit.AgentDispatchService/CreateDispatch' \
--header 'Authorization: Bearer <your-token>' \
--header 'Content-Type: application/json' \
--data '{
"agent_name": "agent-name",
"room": "room-name",
"metadata": "my_job_metadata"
}'
This request will create an explicit dispatch for an agent to join a specified room. Ensure that the agent_name
is registered and the room exists or will be created automatically during the dispatch process.
Would you like more details on this process?
Sources:
- https://docs.livekit.io/agents/build/dispatch/
- https://docs.livekit.io/server-sdk-js/classes/AgentDispatchClient.html 👍 1 button 👎 0 button 💡 Hint: Mention @millions-hair-24956 in the thread for followups.