curl --request GET \
--url https://api.opal.dev/v1/agent-activity/client-settings \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.opal.dev/v1/agent-activity/client-settings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.opal.dev/v1/agent-activity/client-settings', 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.opal.dev/v1/agent-activity/client-settings",
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.opal.dev/v1/agent-activity/client-settings"
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.opal.dev/v1/agent-activity/client-settings")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opal.dev/v1/agent-activity/client-settings")
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{
"batch_wait_seconds": 123,
"max_events_per_request": 123,
"max_bytes_per_request": 123,
"max_requests_per_second": 123,
"burst_requests": 123,
"cache_seconds": 123
}Get agent activity client settings
Prototype. Returns how a client that reports agent activity (today, the Claude Code hook kit on a developer’s machine) should send batched events for this organization: the minimum gap between two sends from one machine, the most events and bytes one request to /agent-activity may carry, the request rate to stay under, and how long the answer may be cached.
The rate is derived from the organization’s own rate limit for POST /agent-activity, which every client in the organization shares: the clients that asked for these settings in the last cache period or two share half of it evenly, and the checks before tool calls keep the other half. A check before a tool call is not batched and should not be held back by this rate. A client is counted by its X-Opal-Host and X-Opal-Actor headers, so it should send the same ones it sends to /agent-activity.
A client should ask for these at most once per cache_seconds, and keep using its last answer, or its own defaults, when it cannot get one.
curl --request GET \
--url https://api.opal.dev/v1/agent-activity/client-settings \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.opal.dev/v1/agent-activity/client-settings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.opal.dev/v1/agent-activity/client-settings', 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.opal.dev/v1/agent-activity/client-settings",
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.opal.dev/v1/agent-activity/client-settings"
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.opal.dev/v1/agent-activity/client-settings")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opal.dev/v1/agent-activity/client-settings")
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{
"batch_wait_seconds": 123,
"max_events_per_request": 123,
"max_bytes_per_request": 123,
"max_requests_per_second": 123,
"burst_requests": 123,
"cache_seconds": 123
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
The settings for this organization.
AgentActivityClientSettings Object
Description
How a client should send batched agent activity for this organization.
The minimum gap between two sends from one machine. Send at once when the last send was at least this long ago; otherwise wait until this long after the last send, and send what arrived meanwhile as one request. Between 0 and 300.
The most events one request to /agent-activity may carry.
The largest body, in bytes, /agent-activity accepts for a request with more than one event. A request with one event may be up to 1 MiB.
The rate of batched requests one client should stay under. Can be below 1.
How many batched requests a client may send at once before the rate applies. At least 1.
How long these settings may be kept before asking again.
Was this page helpful?