Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/add-method-list-agent-worker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"github.com/livekit/protocol": patch
---

Init AgentService and add method ListAgentWorker
20 changes: 20 additions & 0 deletions protobufs/livekit_agent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions protobufs/rpc/agent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading