kind-bear-14210
12/27/2025, 10:01 PMtall-airline-16756
12/27/2025, 10:01 PMtall-airline-16756
12/27/2025, 10:02 PMContent-Type: application/json and an Authorization Bearer JWT with appropriate permissions (room admin/join or agent_admin as needed).
• Payload shape: metadata must be a JSON-encoded string (not an object). Example body:
{
"agent_name": "test_agent",
"room": "aloha2",
"metadata": "{\"user_id\":\"123\"}"
}
If you still get 200 OK but no room, please share (sanitized) the exact request headers and JSON body you sent and whether you used the CLI's stored credentials or your own JWT so I can help pinpoint the issue.
Sources: Agent dispatch | LiveKit docs | Python SDKs | livekit/livekit_composite | DeepWikikind-bear-14210
12/27/2025, 10:13 PMtall-airline-16756
12/27/2025, 10:13 PMagent.dispatch is not a valid top-level claim).
{
"jti": "unique-token-id",
"iat": 1700000000,
"exp": 1700003600,
"iss": "API_KEY",
"sub": "participant-identity",
"video": {
"roomCreate": true,
"roomAdmin": true,
"room": "specific-room-name"
},
"metadata": "optional-metadata-string",
"attributes": {
"custom-key": "custom-value"
},
"room_config": {
"agents": [
{
"agent_name": "test_agent",
"metadata": "{\"user_id\":\"123\"}"
}
]
}
}
Key notes:
• iat and exp are Unix epoch timestamps.
• iss must be your API key; sub is the participant identity.
• video.room is required when roomCreate or roomAdmin is true.
• metadata values are strings. For agent metadata, JSON must be encoded as a string ("{\"user_id\":\"123\"}").
• Do not use a top-level "agent": {"dispatch": true} claim — agent dispatch is configured via room_config.agents (embedded in the token) or via the Agent Dispatch API/SDK.
If you want a ready-to-use example in a specific SDK (Node/Python/Go) to sign this token, tell me which one and I’ll provide it.
Sources: Server-side | livekit/livekit_composite | DeepWiki | server-sdk-kotlin | livekit/livekit_composite | DeepWiki | server-sdk-go | livekit/livekit_composite | DeepWiki