Reportar Anomalia
curl --request POST \
--url https://api.truthlocks.com/v1/agents/{agentId}/anomalies \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"anomaly_type": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({anomaly_type: '<string>'})
};
fetch('https://api.truthlocks.com/v1/agents/{agentId}/anomalies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/agents/{agentId}/anomalies"
payload = { "anomaly_type": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/agents/{agentId}/anomalies"
payload := strings.NewReader("{\n \"anomaly_type\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"anomaly_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"anomaly_type": "<string>",
"severity": "low",
"details": {},
"status": "open",
"resolution": "<string>",
"resolved_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"resolved_at": "2023-11-07T05:31:56Z"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Conformidade e Anomalias
Reportar Anomalia
Reportar uma anomalia comportamental detetada na atividade de um agente de IA.
POST
/
v1
/
agents
/
{agentId}
/
anomalies
Reportar Anomalia
curl --request POST \
--url https://api.truthlocks.com/v1/agents/{agentId}/anomalies \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"anomaly_type": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({anomaly_type: '<string>'})
};
fetch('https://api.truthlocks.com/v1/agents/{agentId}/anomalies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/agents/{agentId}/anomalies"
payload = { "anomaly_type": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/agents/{agentId}/anomalies"
payload := strings.NewReader("{\n \"anomaly_type\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"anomaly_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"anomaly_type": "<string>",
"severity": "low",
"details": {},
"status": "open",
"resolution": "<string>",
"resolved_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"resolved_at": "2023-11-07T05:31:56Z"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Reporta uma anomalia comportamental detetada na atividade de um agente de IA. As anomalias são observações sinalizadas que indicam que um agente pode estar a operar fora do seu envelope comportamental esperado — como picos de taxa súbitos, violações de âmbito, quedas na pontuação de confiança ou anomalias de acesso geográfico.
Os relatórios de anomalias criam alertas acionáveis para equipas de segurança e podem acionar políticas de resposta automatizadas (por exemplo, limitação, revogação de sessão ou suspensão de agente) dependendo da gravidade e da configuração do inquilino.
Tipos de Anomalia
| Tipo | Descrição |
|---|---|
rate_spike | Taxa de solicitação do Agente excede significativamente a linha de base histórica |
scope_violation | O agente tentou acessar um recurso fora de seus escopos concedidos |
trust_drop | Pontuação de confiança calculada do Agente caiu abaixo do limite |
pattern_deviation | O padrão de comportamento do agente se desvia de sua linha de base treinada |
geographic_anomaly | Agente acessado de um local geográfico ou faixa de IP inesperada |
Níveis de Gravidade
| Gravidade | SLA | Resposta Automática |
|---|---|---|
low | revisão de 24h | Apenas registrado |
medium | Revisão de 4h | Agente restringido |
high | revisão de 1h | Sessões suspensas |
critical | Revisão de 15min | Agente revogado aguardando investigação |
Resposta
Ação de resposta automatizada tomada (se houver), com base na gravidade e na política do locatário.
Corpo
application/json
Resposta
Anomalia reportada

