diff --git a/.changeset/add-method-list-agent-worker.md b/.changeset/add-method-list-agent-worker.md new file mode 100644 index 00000000..58698bfb --- /dev/null +++ b/.changeset/add-method-list-agent-worker.md @@ -0,0 +1,5 @@ +--- +"github.com/livekit/protocol": patch +--- + +Init AgentService and add method ListAgentWorker \ No newline at end of file diff --git a/protobufs/livekit_agent.proto b/protobufs/livekit_agent.proto index afd0e79d..306ccc74 100644 --- a/protobufs/livekit_agent.proto +++ b/protobufs/livekit_agent.proto @@ -21,6 +21,26 @@ option ruby_package = "LiveKit::Proto"; import "livekit_models.proto"; +service AgentService { + rpc ListAgentWorker(ListAgentWorkerRequest) returns (ListAgentWorkerResponse); +} + +message ListAgentWorkerRequest { + string agent_name = 1; // (optional, filter by agent name) + JobType job_type = 2; // (optional, filter by job type) +} + +message ListAgentWorkerResponse { + repeated AgentWorker agent_workers = 1; +} + +message AgentWorker { + string id = 1; + string agent_name = 2; + JobType job_type = 3; + float load = 4; +} + message Job { string id = 1; string dispatch_id = 9; diff --git a/protobufs/rpc/agent.proto b/protobufs/rpc/agent.proto index e52114d1..95c5a085 100644 --- a/protobufs/rpc/agent.proto +++ b/protobufs/rpc/agent.proto @@ -26,6 +26,9 @@ service AgentInternal { rpc CheckEnabled(CheckEnabledRequest) returns (CheckEnabledResponse) { option (psrpc.options).multi = true; }; + rpc ListWorker(livekit.ListAgentWorkerRequest) returns (livekit.ListAgentWorkerResponse) { + option (psrpc.options).multi = true; + }; rpc JobRequest(livekit.Job) returns (JobRequestResponse) { option (psrpc.options) = { affinity_func: true