Read the org's agent controls (AS19)
curl --request GET \
--url https://api.eddy.engineer/v1/agents.controlimport requests
url = "https://api.eddy.engineer/v1/agents.control"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.eddy.engineer/v1/agents.control', 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.eddy.engineer/v1/agents.control",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.eddy.engineer/v1/agents.control"
req, _ := http.NewRequest("GET", url, nil)
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.eddy.engineer/v1/agents.control")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/agents.control")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"agent": {
"can_pause": true,
"id": "<string>",
"org": "<string>",
"paused": {
"at_unix_ms": 123,
"by": "<string>",
"note": "<string>"
},
"policy": [
{
"agent": "<string>",
"effect": "<string>",
"effective": "allow",
"engine": "<string>",
"locked": true,
"org": "<string>",
"source": "agent"
}
]
},
"billing": "off",
"can_edit": true,
"ceilings": {
"per_day_credits": 123,
"per_run_credits": 123
},
"defaults": {},
"effects": [
{
"effect": "<string>",
"engine": "<string>",
"org": "<string>"
}
],
"lock": true,
"org": "<string>",
"paused": [
{
"agent": "<string>",
"at_unix_ms": 123,
"by": "<string>",
"name": "<string>",
"note": "<string>"
}
],
"stopped": {
"at_unix_ms": 123,
"by": "<string>",
"note": "<string>"
},
"today": {
"day": "<string>",
"held_credits": 123,
"left_credits": 123,
"running": 123,
"runs": 123,
"spent_credits": 123
},
"updated_at_unix_ms": 123,
"updated_by": "<string>",
"version": 123
}Meta
Read the org's agent controls (AS19)
The caller’s org: its kill switch, its ceilings (credits per run and per day) with what today has spent and what running agents hold, its policy defaults per effect and whether they are a floor, and its paused agents. With ?agent=<id>, that agent’s pause, whether the caller may pause it, and its effective policy per effect (the agent’s own word, else the org’s default, else the engine’s: read / compute / costly allow, write ask, external deny; a locked org default is a floor). An app or an agent run reads none of it (403).
GET
/
v1
/
agents.control
Read the org's agent controls (AS19)
curl --request GET \
--url https://api.eddy.engineer/v1/agents.controlimport requests
url = "https://api.eddy.engineer/v1/agents.control"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.eddy.engineer/v1/agents.control', 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.eddy.engineer/v1/agents.control",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.eddy.engineer/v1/agents.control"
req, _ := http.NewRequest("GET", url, nil)
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.eddy.engineer/v1/agents.control")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/agents.control")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"agent": {
"can_pause": true,
"id": "<string>",
"org": "<string>",
"paused": {
"at_unix_ms": 123,
"by": "<string>",
"note": "<string>"
},
"policy": [
{
"agent": "<string>",
"effect": "<string>",
"effective": "allow",
"engine": "<string>",
"locked": true,
"org": "<string>",
"source": "agent"
}
]
},
"billing": "off",
"can_edit": true,
"ceilings": {
"per_day_credits": 123,
"per_run_credits": 123
},
"defaults": {},
"effects": [
{
"effect": "<string>",
"engine": "<string>",
"org": "<string>"
}
],
"lock": true,
"org": "<string>",
"paused": [
{
"agent": "<string>",
"at_unix_ms": 123,
"by": "<string>",
"name": "<string>",
"note": "<string>"
}
],
"stopped": {
"at_unix_ms": 123,
"by": "<string>",
"note": "<string>"
},
"today": {
"day": "<string>",
"held_credits": 123,
"left_credits": 123,
"running": 123,
"runs": 123,
"spent_credits": 123
},
"updated_at_unix_ms": 123,
"updated_by": "<string>",
"version": 123
}Response
The org's controls