Agent key only: long-poll (at most 25 s) for candidate runs queued for this agent
GET
/
api
/
v1
/
agent
/
commands
Agent key only: long-poll (at most 25 s) for candidate runs queued for this agent
curl --request GET \
--url http://127.0.0.1:18000/api/v1/agent/commands \
--header 'Authorization: Bearer <token>'import requests
url = "http://127.0.0.1:18000/api/v1/agent/commands"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://127.0.0.1:18000/api/v1/agent/commands', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:18000/api/v1/agent/commands"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"commands": [
{
"id": "<string>",
"kind": "run_candidate",
"attempt": 123,
"control": {
"endpoint": "<string>",
"model": "<string>",
"server_key": "<string>"
},
"deadline_at": "2023-11-07T05:31:56Z",
"run_candidate": {
"accelerator": "<string>",
"endpoint": "<string>",
"gpu_count": 8,
"label": "<string>",
"load": {
"concurrency": 128,
"input_tokens": 16384,
"output_tokens": 16384,
"requests": 2500,
"streaming": true,
"tokenizer": "<string>"
},
"model": "<string>",
"workload": {
"cancellation": "http-disconnect",
"command": [
"<string>"
],
"drain": "connection",
"image": "<string>",
"metrics_path": "/metrics",
"models_path": "/v1/models",
"port": 32768,
"protocol": "openai",
"readiness_path": "/health",
"shutdown_grace_seconds": 1800
},
"model_revision": "<string>",
"quality": {
"eval_set": "<string>",
"skip": true
},
"runtime_args": [
"<string>"
],
"timeout_seconds": 10830
}
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}⌘I
Agent key only: long-poll (at most 25 s) for candidate runs queued for this agent
curl --request GET \
--url http://127.0.0.1:18000/api/v1/agent/commands \
--header 'Authorization: Bearer <token>'import requests
url = "http://127.0.0.1:18000/api/v1/agent/commands"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://127.0.0.1:18000/api/v1/agent/commands', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:18000/api/v1/agent/commands"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"commands": [
{
"id": "<string>",
"kind": "run_candidate",
"attempt": 123,
"control": {
"endpoint": "<string>",
"model": "<string>",
"server_key": "<string>"
},
"deadline_at": "2023-11-07T05:31:56Z",
"run_candidate": {
"accelerator": "<string>",
"endpoint": "<string>",
"gpu_count": 8,
"label": "<string>",
"load": {
"concurrency": 128,
"input_tokens": 16384,
"output_tokens": 16384,
"requests": 2500,
"streaming": true,
"tokenizer": "<string>"
},
"model": "<string>",
"workload": {
"cancellation": "http-disconnect",
"command": [
"<string>"
],
"drain": "connection",
"image": "<string>",
"metrics_path": "/metrics",
"models_path": "/v1/models",
"port": 32768,
"protocol": "openai",
"readiness_path": "/health",
"shutdown_grace_seconds": 1800
},
"model_revision": "<string>",
"quality": {
"eval_set": "<string>",
"skip": true
},
"runtime_args": [
"<string>"
],
"timeout_seconds": 10830
}
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}