Skip to content

Init AgentService and add method ListAgentWorker #1013

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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