creamy-tiger-14805
09/04/2025, 11:24 AMtall-airline-16756
09/04/2025, 11:24 AMtall-airline-16756
09/04/2025, 11:25 AMcreamy-tiger-14805
09/04/2025, 11:26 AMlk dispatch create \
--new-room \
--agent-name livspace-agent \
--metadata '+917978884674'
Using project [qualif-test-sd]
Dispatch created: id:"AD_6SLq7tut2uES" agent_name:"livspace-agent" room:"room-5LvqZhwCpswd" metadata:"+917978884674" state:{created_at:1756984926812556951}
{"message": "received job request", "level": "INFO", "name": "livekit.agents", "job_id": "AJ_tDRrpCFnaGmi", "dispatch_id": "", "room_name": "room-5LvqZhwCpswd", "agent_name": "livspace-agent", "resuming": false, "timestamp": "2025-09-04T112206.929896+00:00"}
what's the problem here?tall-airline-16756
09/04/2025, 11:27 AMlk dispatch create \
--new-room \
--agent-name livspace-agent \
--metadata '{"phone_number": "+917978884674"}'
1. Check Dispatch Creation: Try running lk dispatch list --json to see if the metadata is stored correctly in the dispatch.
2. Agent Configuration: Double-check that your agent is registered with the right agent_name in its configuration. For example, in Python:
opts = WorkerOptions(
agent_name="livspace-agent",
)
1. Access Metadata in Agent Code: Make sure your agent code accesses the metadata using ctx.job.metadata. If you passed JSON, don’t forget to parse it like this:
import json
data = json.loads(ctx.job.metadata)
1. Check CLI Version: It helps to be on the latest LiveKit CLI version. You can check yours by running lk --version and update if needed.
2. Enable Verbose Logging: Running the dispatch command with the --verbose flag can show if the metadata is included in the outgoing request.
If you’re still running into trouble, could you let me know:
• Are you using the CLI method or the token-based method?
• Which version of the LiveKit CLI are you on?
• Do you see the metadata when you run lk dispatch list --json?
With this info, we can dig a little deeper and figure out what’s going on. I’m here to help!
Sources: examples/agent_dispatch.py | autocomplete/fish_autocomplete | Agent dispatch | LiveKit Docs | README.md | Dispatching agents | LiveKit Docs