Is there a way to list agent workers in a LiveKit ...
# ask-ai
b
Is there a way to list agent workers in a LiveKit project using SDK?
t
Thanks for reaching out, Masayuki. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — you're asking whether the LiveKit SDK can list agent workers in a project. I’m happy to help. From the available information, there is no documented SDK method or API endpoint that returns a list of agent workers. The sources only show CLI commands for agent management (for example
lk agent list
and
lk agent status
) and references to agent dispatch and lifecycle operations — but they do not confirm an SDK function to list agents. Options you can use instead: • Use the LiveKit CLI commands
lk agent list
or
lk agent status
to view agents for a project. • If you prefer automation, the CLI can often be scripted in the environment where you run it. If you need a programmatic solution (not using the CLI), I can help in two ways: • Help design a small wrapper that calls the CLI from code and parses the output. • Investigate whether a REST/admin API exists in your LiveKit deployment that exposes agent data and help draft the requests (I’ll need details about your deployment/version and whether you have admin API access). Which approach would you prefer — a CLI-wrapper example, or should I try to help locate an admin API endpoint for your deployment?
b
Is there a way to call
<https://cloud-api.livekit.io/cloud_protocol.AnalyticsService/GetAgentsV2>
?
t
Thanks — you're asking whether you can call the specific endpoint
<https://cloud-api.livekit.io/cloud_protocol.AnalyticsService/GetAgentsV2>
to retrieve agent worker information. I do not have documentation confirming that this endpoint is publicly callable or that an SDK exposes it. To help you further, I can assist two ways — but I need a bit more info first: Please tell me: • Do you have admin/owner access to the LiveKit Cloud project (or to a self-hosted LiveKit admin API)? This affects which APIs and auth methods are available. • Do you intend to call this over REST/HTTP or via gRPC? The endpoint name (cloud_protocol.AnalyticsService/GetAgentsV2) looks like a gRPC method name, which may not be directly callable as a simple REST URL without a gRPC gateway. • Are you trying to automate this from a server (backend script) or from a client app? What I can help with once you answer: • If you have admin access: outline how to call the admin-style API (auth headers, example request) or how to call a gRPC method from code, if the API is available. • If the endpoint is not directly exposed: provide a safe workaround (for example, scripting the CLI
lk agent list
and parsing output). • Provide a code example for calling a gRPC endpoint from Node/Go/Python or a small wrapper that invokes the CLI and returns structured data. Which option do you prefer, and can you confirm the three details above?