Developers

Trace schema reference

Traces2
Approved1
Rejected1
Mode0G

Every Argus trace is a structured, deterministic record of one agent decision. The canonical hash covers all decision fields — what the agent saw, remembered, inferred, proposed, and was told. Proof metadata (storage URIs, explorer links) is excluded from the hash boundary so it can change without invalidating the committed evidence.

ArgusTrace

Top-level fields

Schema version: argus.trace.v1

schemaVersion
"argus.trace.v1"
Literal version tag. Used for schema migration detection.
traceId
string (UUID)
Globally unique trace identifier. Used as storage path hint.
createdAt
string (ISO 8601)
Timestamp of trace creation in agent runner.
chainId
number
EVM chain ID for the mandate court contract. 16661 = 0G Mainnet. 31337 = local Anvil for development.
mandateId
string
Mandate identifier governing this action proposal.
agentId
string
Agent identifier matching AgentRegistry token ID.
observation
{ source, content }
What triggered this action. Source = feed/sensor/schedule/manual.
memory.promptInjectionDetected
boolean
True if agent detected adversarial content in context. High-risk signal.
memory.relevantMemory
string[]
Relevant memory fragments that influenced the inference.
inference.summary
string
Human-readable rationale for the proposed action.
inference.riskSignals
string[]
Detected risk factors prior to proposal. Empty = clean inference.
proposedAction
ActionProposal
Full action proposal: actionType, target, recipient, asset, amount, actionId.
policyCheck.verdict
"approved" | "rejected"
Policy engine verdict before on-chain gate.
policyCheck.violationCodes
string[]
Violation codes from policy check (VIOLATION_AMOUNT etc).
policyCheck.checks
PolicyCheck[]
Per-clause check results with clause name and pass/fail status.
execution.status
"approved" | "rejected"
Final execution outcome. Matches on-chain verdict.
execution.txHash
0x${string}?
Transaction hash of ActionGate.submitAction() call.
execution.reason
string?
Human-readable rejection reason when status = rejected.
penalty.slashed
boolean
True if bond was slashed for this trace.
penalty.amount
string?
Slash amount in wei (as string to preserve precision).
penalty.complianceScoreBefore
number
Compliance score before this action. Approved: +5. Rejected: −200.
penalty.complianceScoreAfter
number
Compliance score after this action.
attestation
Attestation?
Runtime attestation metadata. Currently simulated by agent runner.
traceSegments
TraceSegment[]?
6 named hash segments (see below). Null until trace is sealed.
merkleRoot
0x${string}?
Merkle root of segment hashes. Not yet implemented.
proof.canonicalHash
0x${string}
keccak256(canonicalize(tracePayloadForHash(trace))). The committed root.
proof.storageURI
string
Storage URI where full trace JSON was uploaded. local://traces/<name>.json or 0g://<cid>.
proof.committedTraceRoot
0x${string}
Root value committed on-chain via TraceCommitment.commitTrace(). Must match canonicalHash.
TraceSegment

6 named hash segments

Each segment is independently hashable. Segment hashes allow targeted verification: auditors can verify the inference segment without accessing observation memory.

01observation
Encodes observation.source + observation.content
02memory
Encodes memory.promptInjectionDetected + memory.relevantMemory
03inference
Encodes inference.summary + inference.riskSignals
04proposal
Encodes proposedAction (all fields)
05policy
Encodes policyCheck.verdict + policyCheck.violationCodes
06execution
Encodes execution.status + penalty.slashed + penalty.amount
Hashing

Hash boundary

tracePayloadForHash() strips mutable proof metadata before computing the canonical root. This is the deliberate hash boundary: the root commits to the decision record, not the storage infrastructure.

// tracePayloadForHash strips proof metadata before hashing.
// This means storageURI, explorerUrl, and provider labels can
// change without invalidating the committed evidence record.

export function tracePayloadForHash(trace: ArgusTrace) {
  const { proof: _proof, attestation: _att, ...core } = trace;
  return core; // everything that matters to the decision
}

// The root is deterministic:
// keccak256(canonicalize(tracePayloadForHash(trace)))
// Same agent + same inputs = same root. Forever.
ProofPackage

Exportable proof bundle

A ProofPackage bundles all verification inputs for a single committed trace. This is what the /proof/:root page renders and what buildProofPackage() produces.

packageId
string
Unique proof package ID.
traceRoot
0x${string}
Canonical trace root — primary identifier for this evidence record.
traceId
string
Back-reference to the source ArgusTrace.
agentId / mandateId
string
Denormalized for direct lookup.
violationId
string?
Linked violation record ID if this is a rejected trace.
proof
ProofPanelData
On-chain anchoring data: contractAddress, txHash, blockNumber, traceRoot, storageURI, provider status.
attestation
Attestation
Runtime attestation: provider, mode, runnerVersion, executionEnvironmentHash, policyEngineHash.
segmentHashes
TraceSegment[]
6 named segments, each with id, label, summary, hash.
verification
VerificationResult
Result of verifyTrace(): status (valid | mismatch | invalid-json), computedRoot, committedRoot, diff, checkedAt.
Live sample

Demo trace JSON

Real trace from the local demo — generated by the agent runner, canonicalised, and stored.

{
  "schemaVersion": "argus.trace.v1",
  "traceId": "trace-action-compliant-swap-100-usdc-0g-1778903248450-agent-3-mandate-3",
  "createdAt": "2026-05-16T03:47:28.450Z",
  "chainId": 16661,
  "mandateId": "3",
  "agentId": "3",
  "observation": {
    "source": "treasury_state",
    "content": "Treasury drift detected: USDC allocation can be rebalanced through approved liquidity venue."
  },
  "memory": {
    "promptInjectionDetected": false,
    "relevantMemory": [
      "Mandate allows swaps, rebalances, and repayments under 500 USDC."
    ]
  },
  "inference": {
    "summary": "The action is within size, target, recipient, asset, and action-type limits.",
    "riskSignals": []
  },
  "proposedAction": {
    "actionId": "action-compliant-swap-100-usdc-0g-1778903248450",
    "mandateId": "3",
    "agentId": "3",
    "actionType": "swap",
    "target": "0x9db2e380f9100793ea71413224dD7C22F97aD91B",
    "recipient": "0x94c188F8280cA706949CC030F69e42B5544514ac",
    "asset": "0x1850d2a31CB8669Ba757159B638DE19Af532ba5e",
    "amount": "100000000",
    "calldataPreview": "swap(address asset,uint256 amount,address recipient)",
    "reason": "Rebalance 100 USDC through an explicitly allowed mock Uniswap target."
  },
  "policyCheck": {
    "verdict": "APPROVED",
    "checks": {
      "maxAmount": "pass",
      "targetAllowed": "pass",
      "recipientBlocked": "pass",
      "actionTypeAllowed": "pass",
      "actionTypeForbidden": "pass",
      "assetMatches": "pass"
    },
    "violationCodes": []
  },
  "execution": {
    "status": "approved"
  },
  "penalty": {
    "slashed": false,
    "complianceScoreBefore": 800,
    "complianceScoreAfter": 805
  },
  "attestation": {
    "provider": "local-dev",
    "mode": "simulated",
    "runnerVersion": "argus-runner/0.3.0",
    "executionEnvironmentHash": "0x9a8b5634d09129a80908cfd2724ad161480ea943b64a8e46191695f11526cf44",
    "policyEngineHash": "0xd44e2e425e7027b1558fb4e9c83e23a4dbcbeb026b5c9490a6fb66e1dfbbaeec",
    "note": "Local runner attestation. 0G Compute / TEE remains a roadmap provider."
  },
  "proof": {
    "canonicalHash": "0xb81c626b73f1395c60f75e86c1df2021b64e3b0aba85ff9b8b84db438da42c3b",
    "storageURI": "0g://0x0d33a82d37fce005c7380c8cfb067d7a9eac77b63b88ab38bb76dadcd48fb740",
    "committedTraceRoot": "0xb81c626b73f1395c60f75e86c1df2021b64e3b0aba85ff9b8b84db438da42c3b"
  },
  "traceSegments": [
    {
      "id": "observation",
      "label": "Observation",
      "summary": "Treasury drift detected: USDC allocation can be rebalanced through approved liquidity venue.",
      "hash": "0xe6323708f30ee01a51f6adba7d4837c72e40d0c3c378267080a0e082214982bd"
    },
    {
      "id": "inference",
      "label": "Inference",
      "summary": "The action is within size, target, recipient, asset, and action-type limits.",
      "hash": "0x9d947d791d8123737acab45c538b4f9f082010f7a4bbc016bd66d78f0e99152f"
    },
    {
      "id": "proposal",
      "label": "Proposed Action",
      "summary": "Rebalance 100 USDC through an explicitly allowed mock Uniswap target.",
      "hash": "0x6de5f72dcdf1d58b168294582adf2c3c82b60fc2b50b33fd30f832857e5b9a51"
    },
    {
      "id": "policy",
      "label": "Policy Verdict",
      "summary": "APPROVED",
      "hash": "0xceb2387a9499e7c13205204b49722d388aaebc079ffab45a9f23acdf2f787b76"
    },
    {
      "id": "penalty",
      "label": "Penalty",
      "summary": "No penalty",
      "hash": "0xb1ba20e7b7ebeb83748e7c3f9b98fc10ba069e97670a022303f56a8ea70a3cd6"
    }
  ],
  "merkleRoot": "0x0933d6b92c56bb8592271763db2afeee3a69b480c59de9df57d1242d7b3f7e47"
}