Query cognition beats (events)
curl --request GET \
--url https://api.visiqlabs.com/v1/allow/cognition/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.visiqlabs.com/v1/allow/cognition/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.visiqlabs.com/v1/allow/cognition/events', 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.visiqlabs.com/v1/allow/cognition/events",
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.visiqlabs.com/v1/allow/cognition/events"
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.visiqlabs.com/v1/allow/cognition/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.visiqlabs.com/v1/allow/cognition/events")
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{
"total": 123,
"page": 123,
"pageSize": 123,
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "<string>",
"session_id": "<string>",
"thread_id": "<string>",
"parent_event_id": "<string>",
"seq": 123,
"client_event_id": "<string>",
"ts": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"kind": "thought",
"visibility": "shown",
"status": "<string>",
"provenance": "signed",
"revised": true,
"content": {},
"tool": {},
"result": {},
"governance": {},
"decision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"spawn_child_agent_id": "<string>",
"spawn_child_name": "<string>",
"spawn_kind": "subagent",
"spawn_model": "<string>",
"spawn_prompt": "<string>",
"phase": {},
"handoff": {},
"model": "<string>",
"agent_role": "<string>",
"framework": "<string>",
"attribution": {},
"memory": {
"op": "read",
"store": "<string>",
"scope": "session",
"itemCount": 123,
"bytes": 123,
"hit": true
},
"cost": {
"tokensIn": 123,
"tokensOut": 123,
"cacheRead": 123,
"cacheWrite": 123
},
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": "Invalid request body",
"code": "invalid_request",
"details": [
{
"path": [
"agent_id"
],
"message": "Required"
}
]
}{
"error": "Unauthorized",
"code": "unauthenticated"
}{
"error": "insufficient_scope",
"code": "insufficient_scope",
"detail": "This API key is not authorized for the requested operation."
}{
"error": "rate_limiter_unavailable",
"code": "rate_limiter_unavailable",
"detail": "Rate limiter unavailable, please retry."
}Cognition
Query cognition beats (events)
Paginated cognition beats. Under a session_id filter, beats are ordered seq ascending (the client-authoritative interleave order); otherwise created_at descending. limit above 200 is a 400, never a silent clamp. Stored content is floor-redacted; the encrypted raw is NEVER served here (reveal is the audited unmask endpoint). Beat cost carries raw token buckets only; price at read time. Requires permission allow_cognition:view and scope cognition:read.
GET
/
v1
/
allow
/
cognition
/
events
Query cognition beats (events)
curl --request GET \
--url https://api.visiqlabs.com/v1/allow/cognition/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.visiqlabs.com/v1/allow/cognition/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.visiqlabs.com/v1/allow/cognition/events', 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.visiqlabs.com/v1/allow/cognition/events",
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.visiqlabs.com/v1/allow/cognition/events"
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.visiqlabs.com/v1/allow/cognition/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.visiqlabs.com/v1/allow/cognition/events")
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{
"total": 123,
"page": 123,
"pageSize": 123,
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "<string>",
"session_id": "<string>",
"thread_id": "<string>",
"parent_event_id": "<string>",
"seq": 123,
"client_event_id": "<string>",
"ts": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"kind": "thought",
"visibility": "shown",
"status": "<string>",
"provenance": "signed",
"revised": true,
"content": {},
"tool": {},
"result": {},
"governance": {},
"decision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"spawn_child_agent_id": "<string>",
"spawn_child_name": "<string>",
"spawn_kind": "subagent",
"spawn_model": "<string>",
"spawn_prompt": "<string>",
"phase": {},
"handoff": {},
"model": "<string>",
"agent_role": "<string>",
"framework": "<string>",
"attribution": {},
"memory": {
"op": "read",
"store": "<string>",
"scope": "session",
"itemCount": 123,
"bytes": 123,
"hit": true
},
"cost": {
"tokensIn": 123,
"tokensOut": 123,
"cacheRead": 123,
"cacheWrite": 123
},
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": "Invalid request body",
"code": "invalid_request",
"details": [
{
"path": [
"agent_id"
],
"message": "Required"
}
]
}{
"error": "Unauthorized",
"code": "unauthenticated"
}{
"error": "insufficient_scope",
"code": "insufficient_scope",
"detail": "This API key is not authorized for the requested operation."
}{
"error": "rate_limiter_unavailable",
"code": "rate_limiter_unavailable",
"detail": "Rate limiter unavailable, please retry."
}Authorizations
A VisIQ API key presented as Authorization: Bearer vq_prod_.... Mint harness keys under Settings → Harness Keys and API keys under Settings → API Keys in the dashboard.
Query Parameters
1-based page number.
Required range:
x >= 1Page size (max 200).
Required range:
1 <= x <= 200Maximum string length:
255Maximum string length:
255Available options:
thought, speech, action, observation, intervention, spawn, phase, handoff, lifecycle, error, memory Maximum string length:
255