Is there a way to read the agent name within the a...
# ask-ai
g
Is there a way to read the agent name within the agent process?
t
Thanks for reaching out, Ben. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Yes, you can read the agent name within the agent process in LiveKit by using the
agentName
property of a
JobRequest
instance. Here's an example:
Copy code
// Example of accessing agent name from a JobRequest
const agentName = jobRequest.agentName;
This will return a string value representing the agent's name, as set in
WorkerOptions
during the worker setup. Sources: JobRequest | LiveKit Agents