is it possible to assign each agent an id? is that...
# ask-ai
m
is it possible to assign each agent an id? is that part of livekit metadata?
t
Thanks for reaching out, Fancy. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — good question. You can assign an ID to each agent, but that ID is a deployment-level identifier, not runtime metadata. • Agent ID: set during deployment (in
livekit.toml
under
[agent] -> id
) and used for management, monitoring, and updates. • `agent_name`: can be set in code and used for routing/dispatch. • Job/runtime metadata: used to pass dynamic data to jobs and is separate from the agent ID. Would you like instructions for where to set the
id
in
livekit.toml
or how to set
agent_name
in your agent code? Sources: Deploying to production | LiveKit Docs | Server-side | livekit/livekit_composite | DeepWiki | Agents Framework | livekit/livekit_composite | DeepWiki | Agent dispatch | LiveKit docs | Agent Builder | LiveKit docs
m
can you elaborate on setting the id in livekit.toml?
t
You're asking for details on setting the agent ID in
livekit.toml
— here's how to do that and what it affects. 1) Location & section • Open your service's
livekit.toml
and find (or add) the
[agent]
section. The
id
field belongs there. 2) Format & example • Use a simple string for the id (unique per agent). Example:
Copy code
[agent]
id = "agent-nyc-01"
agent_name = "nyc-worker"
3) What the fields mean • `id`: Deployment-level unique identifier for the agent used by LiveKit Cloud for management, monitoring, and updates. • `agent_name`: Optional name you can set in code for routing/dispatch purposes (helps identify workers in logs/dispatch decisions). 4) Deployment notes • Ensure each agent in your fleet has a unique
id
. • After updating
livekit.toml
, deploy/restart the agent so the new id is picked up by the management system. Would you like a sample
livekit.toml
with other common agent fields or instructions for restarting a specific deployment type?