Governance
Traces

Traces

Every execution produces a trace record β€” a complete audit trail of what happened, why, and how it was validated.

Trace Structure

FieldDescription
traceHashUnique hash identifying this execution
reasoningAgent's reasoning or LLM output that led to the action
proposedActionThe action the agent intended to execute
validationResultOverall validation outcome (allowed/blocked)
policyVerdictsPer-rule verdict (which policies passed, which blocked)
signaturesCryptographic signatures applied to the execution
txHashOn-chain transaction hash (if executed)
statusexecuted, blocked, or pending_approval
riskScoreComputed risk score (0-100)
blockedByWhich policy blocked the action (if blocked)
durationMsExecution duration in milliseconds

Trace Lifecycle

Agent reasons β†’ Proposes action β†’ Policy evaluation
                                      β”‚
                      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                      β–Ό                β–Ό                β–Ό
                  Executed       Pending Approval     Blocked
                  (trace +       (trace + approval    (trace +
                   txHash)        record created)      blockedBy)

Reading a Trace

Reasoning

The agent's full reasoning output. For LLM-powered agents, this is the model's chain-of-thought. For rule-based agents, this is the decision logic.

Policy Verdicts

An array of per-rule results showing which policies were evaluated and their outcomes:

  • Rule name
  • Passed/failed
  • Additional info (e.g., "Amount $500 within $1,000 daily limit")

Validation Result

The overall verdict combining all policy verdicts. If any critical policy fails, the action is blocked.

API

List Traces

GET /apps/{appId}/traces?status=blocked&limit=50
Authorization: Bearer {apiKey}

Get Trace by Hash

GET /apps/{appId}/traces/{traceHash}
Authorization: Bearer {apiKey}

Record a Trace

POST /apps/{appId}/traces
Authorization: Bearer {apiKey}
Content-Type: application/json
 
{
  "traceHash": "0xabc123...",
  "reasoning": "User requested transfer of 100 USDC to known recipient...",
  "proposedAction": "{\"type\":\"transfer\",\"amount\":100000000,\"token\":\"USDC\"}",
  "validationResult": "{\"allowed\":true,\"riskScore\":15}",
  "policyVerdicts": ["spending_limits:passed", "chain_whitelist:passed"],
  "status": "executed",
  "txHash": "0xdef456...",
  "riskScore": 15,
  "durationMs": 1250,
  "agentId": "agt_abc123",
  "sessionKeyHash": "0x..."
}