JavaScript
import Cerca from '@cerca-dev/sdk';
const client = new Cerca({
apiKey: process.env['CERCA_API_KEY'], // This is the default and can be omitted
});
const effectiveConfiguration = await client.agents.retrieveConfig('agent_abc123');
console.log(effectiveConfiguration.approvals);import os
from cerca import Cerca
client = Cerca(
api_key=os.environ.get("CERCA_API_KEY"), # This is the default and can be omitted
)
effective_configuration = client.agents.retrieve_config(
"agent_abc123",
)
print(effective_configuration.approvals)package main
import (
"context"
"fmt"
"github.com/matrices/cerca-go"
"github.com/matrices/cerca-go/option"
)
func main() {
client := cercago.NewClient(
option.WithAPIKey("My API Key"),
)
effectiveConfiguration, err := client.Agents.GetConfig(context.TODO(), "agent_abc123")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", effectiveConfiguration.Approvals)
}
require "cerca"
cerca = Cerca::Client.new(api_key: "My API Key")
effective_configuration = cerca.agents.retrieve_config("agent_abc123")
puts(effective_configuration)cerca agents retrieve-config \
--api-key 'My API Key' \
--agent-id agent_abc123curl --request GET \
--url https://api.cerca.dev/agents/{agentId}/config \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cerca.dev/agents/{agentId}/config",
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;
}HttpResponse<String> response = Unirest.get("https://api.cerca.dev/agents/{agentId}/config")
.header("Authorization", "Bearer <token>")
.asString();{
"approvals": {
"tools": {},
"timeoutMs": 123
},
"approvalsWritableByAgent": true,
"defaultModel": "<string>",
"lockedByFleet": [
"defaultModel"
],
"resolvedFromFleet": [
"defaultModel"
],
"tools": [
"get_time"
],
"instructions": "<string>"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}Agents
Retrieve config
GET
/
agents
/
{agentId}
/
config
JavaScript
import Cerca from '@cerca-dev/sdk';
const client = new Cerca({
apiKey: process.env['CERCA_API_KEY'], // This is the default and can be omitted
});
const effectiveConfiguration = await client.agents.retrieveConfig('agent_abc123');
console.log(effectiveConfiguration.approvals);import os
from cerca import Cerca
client = Cerca(
api_key=os.environ.get("CERCA_API_KEY"), # This is the default and can be omitted
)
effective_configuration = client.agents.retrieve_config(
"agent_abc123",
)
print(effective_configuration.approvals)package main
import (
"context"
"fmt"
"github.com/matrices/cerca-go"
"github.com/matrices/cerca-go/option"
)
func main() {
client := cercago.NewClient(
option.WithAPIKey("My API Key"),
)
effectiveConfiguration, err := client.Agents.GetConfig(context.TODO(), "agent_abc123")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", effectiveConfiguration.Approvals)
}
require "cerca"
cerca = Cerca::Client.new(api_key: "My API Key")
effective_configuration = cerca.agents.retrieve_config("agent_abc123")
puts(effective_configuration)cerca agents retrieve-config \
--api-key 'My API Key' \
--agent-id agent_abc123curl --request GET \
--url https://api.cerca.dev/agents/{agentId}/config \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cerca.dev/agents/{agentId}/config",
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;
}HttpResponse<String> response = Unirest.get("https://api.cerca.dev/agents/{agentId}/config")
.header("Authorization", "Bearer <token>")
.asString();{
"approvals": {
"tools": {},
"timeoutMs": 123
},
"approvalsWritableByAgent": true,
"defaultModel": "<string>",
"lockedByFleet": [
"defaultModel"
],
"resolvedFromFleet": [
"defaultModel"
],
"tools": [
"get_time"
],
"instructions": "<string>"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Minimum string length:
1Example:
"agent_abc123"
Response
Effective agent configuration.
Show child attributes
Show child attributes
Available options:
defaultModel, instructions, tools, approvals Available options:
defaultModel, instructions, tools, approvals Effective internal runtime tools after applying fleet defaults, fleet locks, and the agent allowlist.
Available options:
get_time, sub_thread, wait, tool.call, tool.discover, artifact.read, agent.threads.list, agent.threads.get, agent.approvals.cancel, agent.approvals.grant_thread, agent.approvals.grant_agent, agent.create, agent.approvals.update, tool.connect, sandbox.exec, sandbox.read, sandbox.write_file, sandbox.read_file, sandbox.spawn, sandbox.stdin, sandbox.session_read, sandbox.kill, sandbox.list_sessions, sandbox.sync_artifact, memory.read, memory.list, memory.search, memory.write, memory.delete, db.query, web.search, web.fetch, agent.schedule.list, agent.schedule.create, agent.schedule.update, agent.schedule.delete, agent.schedule.trigger