How to audit every AI decision with intelligence traces
A successful answer from most routes, when it is a JSON object, carries a trace ID. A call that is not a GET keeps its trace under that ID, the whole breakdown whatever the profile, so fetch the trace by that ID: what the system remembered, what tools it proposed, what the rules said, what gaps it found (a route that writes its own intelligence object, like chat completions, keeps that one; a GET carries an ID too and keeps no trace, so its ID names nothing to fetch). The trace is written in the background and the answer does not wait for it, so a trace fetched the moment the answer arrives may not be there yet, and one the store cannot take is logged and not retried. The audit log, further down, is the part that is hash-chained.
A successful answer includes a trace
The intelligence object in a successful answer from most routes contains the full decision breakdown. With the lean profile the answer carries only the trace ID, and on an error the layer adds only the X-Cadreen-Trace-ID header (a refusal before the handler runs carries none).
{
"intelligence": {
"capability": {
"total_available": 42,
"healthy_count": 38,
"active_integrations": ["acme", "github", "slack"]
},
"reasoning": {
"capability_matches": 42,
"tools_considered": 30,
"stages_executed": ["capability_check", "memory_lookup", "governance_eval", "gap_analysis"]
},
"memory": {
"healthy": true,
"knowledge_queried": 147
},
"governance": {
"active": true,
"decision": "approved"
},
"humility": {
"gaps_detected": 1
},
"process": {
"started_at": "2026-06-21T10:30:00Z",
"duration_ms": 840,
"components": {"memory": true, "tools": true, "governance": true}
}
}
}Query traces from any surface
Visit /dashboard/traces to see all traces with:
- Humanized governance decisions ("Allowed by your rules", "Asked for permission")
- Replay capability
- Filter by decision type, time range, sourceSame traces, read from the dashboard or the API
Tamper-proof audit trail
Every action in the audit log is hash-chained. Each entry includes the hash of the previous entry. Any tampering breaks the chain, so verifying the chain detects it.
// Verify the entire audit trail (signed in; an API key can't call this)
const verification = await fetch("/api/v1/sal/chain/verify");
const result = await verification.json();
console.log(result.chain_intact); // true
console.log(result.violation_count); // 0
console.log(result.violations); // null when intact (else each: Index, ID, Expected, Actual)