Listar agentes
curl --request GET \
--url https://api.truthlocks.com/v1/agents \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/agents"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/agents"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_type": "orchestrator",
"display_name": "<string>",
"description": "<string>",
"status": "active",
"scopes": [
"<string>"
],
"metadata": {},
"trust_score": 0.5,
"public_key": "<string>",
"session_count": 123,
"keys": [
{
"kid": "<string>",
"algorithm": "<string>",
"public_key": "<string>",
"status": "active"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"total": 123
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Agentes de Máquina
Listar agentes
Listar todas las identidades de agentes de máquina para el inquilino autenticado con filtrado y paginación
GET
/
v1
/
agents
Listar agentes
curl --request GET \
--url https://api.truthlocks.com/v1/agents \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/agents"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/agents"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_type": "orchestrator",
"display_name": "<string>",
"description": "<string>",
"status": "active",
"scopes": [
"<string>"
],
"metadata": {},
"trust_score": 0.5,
"public_key": "<string>",
"session_count": 123,
"keys": [
{
"kid": "<string>",
"algorithm": "<string>",
"public_key": "<string>",
"status": "active"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"total": 123
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Listar Agentes
GET /v1/agents
Devuelve una lista paginada de todas las identidades de agentes de máquina registradas bajo el inquilino autenticado. Los resultados se pueden filtrar por tipo de agente, estado y nivel de confianza. Los agentes se devuelven en orden cronológico inverso (los más recientes primero).
Autenticación
Requiere el encabezadoX-API-Key o el token Bearer JWT. El espacio de trabajo se deriva de la credencial autenticada; no envíe X-Tenant-ID.
Respuesta
Matriz de objetos de identidad de agente. Cada objeto contiene el registro completo del agente
incluyendo
agent_id, agent_type, display_name, status, trust_level,
trust_score, scopes, public_key, key_id, metadata,
delegation_depth, created_at, y updated_at.Ejemplo
curl -G https://api.truthlocks.com/v1/agents \
-H "X-API-Key: tl_live_..." \
-d "status=active" \
-d "agent_type=llm" \
-d "limit=10" \
-d "offset=0"

