Reference

PDR v1

The Policy Decision Record: every field, the digests and the transaction state.

A Policy Decision Record is what the engine writes for every intent it judges: the checks, the decision, and digests that bind the record to one intent, one transaction message and one policy. This page lists every field of version 1.

A record

The record for a transfer of 0.5 SOL under the default policy, written by the API:

json
{
  "id": "1ab45685-fd95-4350-894d-9b132332dd87",
  "pdr": "1",
  "tis": {
    "tis": "1",
    "action": "transfer",
    "params": {
      "to": "CvaC1sSWgsG9UZT3fU8R2TRhrFcpxa1d2mR6pU3mTdgv",
      "asset": "SOL",
      "amount": "0.5"
    },
    "reason": "User asked to pay Maya 0.5 SOL for design work."
  },
  "checks": [
    {
      "rule": "schema",
      "detail": "valid TIS v1, compiled to 3 instructions",
      "result": "pass"
    },
    {
      "rule": "paused",
      "detail": "wallet is active",
      "result": "pass"
    },
    {
      "rule": "program_allowlist",
      "detail": "System allowed; ComputeBudget always permitted",
      "result": "pass"
    },
    {
      "rule": "daily_spend",
      "detail": "0 + 0.500005001 of 2 SOL in 24h",
      "result": "pass"
    },
    {
      "rule": "token_limits",
      "detail": "moves no tokens",
      "result": "n/a"
    },
    {
      "rule": "no_unlimited_approval",
      "detail": "grants no approval",
      "result": "n/a"
    }
  ],
  "source": "agent_token",
  "wallet": "BrpKxDbVNo9KmzXy6TULJACV2oh7msEKUXeGurFaLihv",
  "outflow": {
    "source": "simulation",
    "tokens": [],
    "unknown": [],
    "lamports": "500005001"
  },
  "decision": "allow",
  "programs": [
    "11111111111111111111111111111111",
    "ComputeBudget111111111111111111111111111111"
  ],
  "approvals": [],
  "created_at": "2026-11-28T22:44:18.476Z",
  "tis_digest": "ffabb16b1b92d9f5ce521536c52cb893370290896c830c7b76cb7e601ef8deac",
  "policy_digest": "c958b5c7f8fd5818451f8abcc30a0f2494302e935ce5e1a1bcde9ddea57b2293",
  "message_digest": "fb8c79878cc6228eb9b81cbf3646af13151b32f0a420ca03324b80e74f88e39e",
  "policy_version": 1
}

Fields

pdr"1"

The version.

idstring

The record's id.

created_atstring

When the engine wrote it. ISO 8601, UTC.

sourcestring

Where the intent came from: chat, agent_token, or demo for a record made on /demo.

walletaddress

The agent wallet the transaction would spend from.

tisobject

The intent exactly as received. An invalid intent is stored as it came.

tis_digeststring, 64 hex characters

SHA-256 of tis as canonical JSON.

message_digeststring, 64 hex characters, or null

SHA-256 of the serialized bytes of the compiled message, the bytes a signer signs. null when nothing was compiled.

policy_versioninteger

The number of the policy version in force.

policy_digeststring, 64 hex characters

SHA-256 of that policy as canonical JSON.

programsarray of addresses

The program of every top-level instruction in the compiled message, sorted. Empty when nothing was compiled.

outflowobject

What leaves the agent wallet. See outflow.

approvalsarray

Each token approval the message grants. See approvals.

checksarray

Six entries, one per rule, in the engine's order. See checks.

decisionstring

deny if any check is fail, otherwise allow.

outflow

sourcestring

simulation when the amounts are the wallet's balance changes in a simulation of the message, decoded when they are read from the instructions.

lamportsstring (base units)

SOL leaving the wallet, in lamports.

tokensarray

One entry per mint leaving the wallet, sorted by mint: mint, amount in base units, decimals (null if the instruction did not carry them).

unknownarray of strings

Why some outflow could not be read. Any entry fails daily_spend or token_limits.

approvals

sourceaddress

The token account the approval is on.

mintaddress or null

The token. null for a plain Approve, which does not name its mint.

delegateaddress

Who may spend.

amountstring (base units)

The approved amount.

unlimitedboolean

true when the amount is the largest u64.

A record with an approval:

json
[
  {
    "source": "3D3nRcdVkvrGnd75h1FXy73UNQ7KWZwyY5AGTKs8cyzC",
    "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "delegate": "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4",
    "amount": "18446744073709551615",
    "unlimited": true
  }
]

checks

rulestring

One of schema, paused, program_allowlist, daily_spend, token_limits, no_unlimited_approval.

resultstring

pass, fail or n/a.

detailstring

One line saying what the rule saw, with the numbers it compared.

The rules says what each rule reads and what its detail holds.

A record of an invalid intent

Nothing was compiled, so there is no message digest, no programs and no outflow:

json
{
  "pdr": "1",
  "id": "pdr_0009",
  "created_at": "2026-11-28T12:00:00.000Z",
  "source": "demo",
  "wallet": "BwFYBcxEDrybw5YNB92ra3GFj6RVRsdhBofKmf6skkBn",
  "tis": {
    "tis": "1",
    "action": "transfer",
    "params": {
      "asset": "SOL",
      "to": "CvaC1sSWgsG9UZT3fU8R2TRhrFcpxa1d2mR6pU3mTdgv",
      "amount": "0.5 SOL"
    },
    "reason": "User asked to pay Maya 0.5 SOL for design work.",
    "memo": "invoice 114"
  },
  "tis_digest": "d52eaa2b28f46add51f8f6c17dc5de5260206f554a2350415dff035434f1eadf",
  "message_digest": null,
  "policy_version": 1,
  "policy_digest": "c958b5c7f8fd5818451f8abcc30a0f2494302e935ce5e1a1bcde9ddea57b2293",
  "programs": [],
  "outflow": {
    "source": "decoded",
    "lamports": "0",
    "tokens": [],
    "unknown": []
  },
  "approvals": [],
  "checks": [
    {
      "rule": "schema",
      "result": "fail",
      "detail": "params.amount: Must be a decimal string in UI units.; Unrecognized key: \"memo\""
    },
    {
      "rule": "paused",
      "result": "pass",
      "detail": "wallet is active"
    },
    {
      "rule": "program_allowlist",
      "result": "n/a",
      "detail": "nothing was compiled"
    },
    {
      "rule": "daily_spend",
      "result": "n/a",
      "detail": "nothing was compiled"
    },
    {
      "rule": "token_limits",
      "result": "n/a",
      "detail": "nothing was compiled"
    },
    {
      "rule": "no_unlimited_approval",
      "result": "n/a",
      "detail": "nothing was compiled"
    }
  ],
  "decision": "deny"
}

Digests

Each digest is a SHA-256 in lowercase hex.

DigestInput
tis_digestthe tis object, as canonical JSON, UTF-8
policy_digestthe policy's five fields, as canonical JSON, UTF-8
message_digestthe serialized v0 message

Canonical JSON has object keys sorted by UTF-16 code unit at every depth, no whitespace, array order kept, and members whose value is undefined dropped. Amounts are strings, so no number formatting is involved.

The intent above in canonical form:

text
{"action":"transfer","params":{"amount":"0.5","asset":"SOL","to":"CvaC1sSWgsG9UZT3fU8R2TRhrFcpxa1d2mR6pU3mTdgv"},"reason":"User asked to pay Maya 0.5 SOL for design work.","tis":"1"}

Its SHA-256 is the record's tis_digest, ffabb16b1b92d9f5ce521536c52cb893370290896c830c7b76cb7e601ef8deac.

Recompute a digest

In Node, with no dependency:

digest.mjs
import { createHash } from "node:crypto";

// Canonical JSON: keys sorted, no whitespace, undefined members dropped.
export function canonical(value) {
  if (Array.isArray(value)) return `[${value.map((v) => canonical(v ?? null)).join(",")}]`;
  if (value !== null && typeof value === "object") {
    const keys = Object.keys(value).filter((k) => value[k] !== undefined).sort();
    return `{${keys.map((k) => `${JSON.stringify(k)}:${canonical(value[k])}`).join(",")}}`;
  }
  return JSON.stringify(value);
}

// tis_digest and policy_digest
export const jsonDigest = (value) => createHash("sha256").update(canonical(value)).digest("hex");

// message_digest: the serialized transaction message, as bytes
export const messageDigest = (bytes) => createHash("sha256").update(bytes).digest("hex");

jsonDigest(record.tis) equals record.tis_digest. jsonDigest of the policy object that GET /v1/records/{id} returns equals record.policy_digest.

The transaction

The API returns a record together with the state of its transaction. The transaction is not part of the PDR and is not covered by its digests.

statestring

sealed, signed, sent, confirmed or failed. The path of one request says what each means.

signaturestring or null

The transaction's signature in base58, once it is signed.

explorerUrlstring or null

A link to a page for the signature, set by the API's configuration.

errorstring or null

For failed, why, in one sentence.

updatedAtstring

When the state last changed. ISO 8601, UTC.

The transaction of a denied record:

json
{
  "state": "sealed",
  "signature": null,
  "explorerUrl": null,
  "error": null,
  "updatedAt": "2026-11-28T22:44:20.247Z"
}