Agents
Get an agent's readiness
Get an agent’s readiness. Requires permission agents:read.
GET
/
api
/
v3
/
agents
/
{agentId}
/
readiness
Get an agent's readiness
curl --request GET \
--url https://api.forge.gloo.com/api/v3/agents/{agentId}/readiness \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.forge.gloo.com/api/v3/agents/{agentId}/readiness"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.forge.gloo.com/api/v3/agents/{agentId}/readiness', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.forge.gloo.com/api/v3/agents/{agentId}/readiness",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.forge.gloo.com/api/v3/agents/{agentId}/readiness"
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))
}HttpResponse<String> response = Unirest.get("https://api.forge.gloo.com/api/v3/agents/{agentId}/readiness")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.forge.gloo.com/api/v3/agents/{agentId}/readiness")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"agentId": "<string>",
"status": "ready",
"checks": [
{
"id": "worker_present",
"outcome": "pass",
"blocksDispatch": true,
"gate": "<string>",
"code": "<string>",
"message": "<string>",
"action": {
"kind": "seat_worker"
}
}
],
"autonomy": {
"rung": "<string>",
"posture": "<string>",
"consequence": "<string>"
}
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "bad_request",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "forbidden",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "resource_missing",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "internal_error",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}The reference panel describes the current v3 operation. The notes below describe its v2 compatibility API. Follow the v3 request schema for current calls: v3 can move identifiers from the body or query into the URL. Keep the v2 method, path, and payload together when using the compatibility API.
v2 compatibility notes
GET /api/v2/agents/getReadiness?id=<agentId> returns one agent’s “Ready to run” report, as the Console’s agent detail checklist shows it.
Authority
You needagents:read at the agent’s home org unit. A missing, PERSONAL, unhomed or unreadable agent is the same 404 resource_missing (Agent not found); an unavailable agent store is 500. id is required once.
What it returns
status:ready,attentionorblocked.checks: each readiness check with itsoutcome(pass,failornot_applicable), whether a failureblocksDispatch, the governancegatewhose rule it applies, itscodeandmessage, andaction: the kind of fix that clears a failed check (for exampleseat_worker,assign_ownerorattest_identity), ornull.autonomy: the agent’s autonomyrung,postureandconsequence.
What is withheld
A fix names only its kind. The person a fix would suggest, the worker, seat, suggested positions and Jobs, and the definition hash an attestation would sign are never returned, the same rule the governance accountability read follows. People make those fixes in the Console. For owner and attestation findings, see Get an agent’s accountability.Authorizations
BearerAuthPlatformApiKeyPersonalKey
Path Parameters
⌘I
Get an agent's readiness
curl --request GET \
--url https://api.forge.gloo.com/api/v3/agents/{agentId}/readiness \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.forge.gloo.com/api/v3/agents/{agentId}/readiness"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.forge.gloo.com/api/v3/agents/{agentId}/readiness', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.forge.gloo.com/api/v3/agents/{agentId}/readiness",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.forge.gloo.com/api/v3/agents/{agentId}/readiness"
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))
}HttpResponse<String> response = Unirest.get("https://api.forge.gloo.com/api/v3/agents/{agentId}/readiness")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.forge.gloo.com/api/v3/agents/{agentId}/readiness")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"agentId": "<string>",
"status": "ready",
"checks": [
{
"id": "worker_present",
"outcome": "pass",
"blocksDispatch": true,
"gate": "<string>",
"code": "<string>",
"message": "<string>",
"action": {
"kind": "seat_worker"
}
}
],
"autonomy": {
"rung": "<string>",
"posture": "<string>",
"consequence": "<string>"
}
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "bad_request",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "forbidden",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "resource_missing",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "internal_error",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}
