> For the complete documentation index, see [llms.txt](https://docs.metamynd.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.metamynd.ai/core-concepts/evidence-and-audit.md). Agents can also search and read this documentation through its [MCP server](https://docs.metamynd.ai/~gitbook/mcp).

# Evidence & Audit

Every gate decision is signed, batched into a Merkle tree and anchored on Hedera, so anyone can verify a decision without trusting MetaMynd.

Every decision the authorize gate makes — allow, block, escalate, anything else — is written to an evidence ledger anchored on Hedera HCS. Decisions are batched into Merkle roots rather than posted individually, which keeps anchoring cost predictable at volume while preserving the property that matters: any single decision can be proven to have existed, unmodified, at a specific point in time, without trusting MetaMynd's database to have kept an honest copy.

#### Commitments, not raw transactions <a href="#user-content-commitments-not-raw-transactions" id="user-content-commitments-not-raw-transactions"></a>

What gets anchored is a **commitment**, not the raw transaction. The evidence ledger proves that a decision happened and what class of decision it was, without becoming a second copy of every payment amount, destination, and counterparty an agent ever touched. An evidence trail that's itself a data breach waiting to happen isn't a feature — the design goal is a governance layer that behaves as a **blind notary**, not a data honeypot. This is the same principle taken further in [Why Blind Governance](https://docs.metamynd.ai/zero-knowledge/why-blind-governance).

Alongside each anchored decision the gate keeps a **decision record**: the result of each control, stage timestamps, and the **names** of the context fields that were evaluated — never their values. That distinction matters to an auditor: a spend-cap control that never saw an amount was not tested, and scoring it as "passed" would be false assurance. Where the request carried a payload binding that the gate verified, the payload digest is folded into the same anchored commitment, so the anchor also proves which payload the decision was bound to.

#### Verifying evidence yourself <a href="#user-content-verifying-evidence-yourself" id="user-content-verifying-evidence-yourself"></a>

Every batched decision has a Merkle inclusion proof available at `GET /magp/evidence/{eventId}/proof` — the leaf, the path and the anchored root. You don't need to trust MetaMynd's own audit tooling: the inclusion check can be done **offline**, with only the leaf, the proof and the anchored root.

For one decision, the owner can also download a self-contained **audit record** (`GET /evidence/{eventId}/audit-record`, or **Audit record with inclusion proof** on a decision in the dashboard's Decision Explorer): the anchored leaf with its Merkle proof, plus what was requested, the owner, the mandate version, the policy bundle and the rule that decided.

The set of fields in a leaf is part of the protocol. Adding a field would change every digest and invalidate previously anchored proofs, so a change to leaf composition is a breaking protocol change, never a quiet one.

#### Effect safety: knowing what actually happened downstream <a href="#user-content-effect-safety-knowing-what-actually-happened-downstream" id="user-content-effect-safety-knowing-what-actually-happened-downstream"></a>

A subtler problem than "was the action authorised" is "did the authorised action actually complete — once?" The protocol tracks this explicitly through an **effect lifecycle**. Each transition is recorded on a hash-chained ledger (every entry commits to the digest of the previous one), and an invalid transition, a sequence gap, a broken link or a digest mismatch is rejected (`INVALID_EFFECT_TRANSITION`, `SEQUENCE_GAP`, `CHAIN_LINK_BROKEN`, `DIGEST_MISMATCH`).

| Endpoint                                            | Who may call it                               | Meaning                                                                                                                                                                                                           |
| --------------------------------------------------- | --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `POST .../effect/dispatching`                       | the executing service                         | **The claim.** The atomic, single-use take-up of the hold. Exactly one claimant wins; everyone else gets `AUTHORIZATION_ALREADY_CLAIMED`. The payload digest and the trusted-counterparty rules are checked here. |
| `POST .../effect/dispatched`                        | the executing service                         | The call completed.                                                                                                                                                                                               |
| `POST .../effect/unknown`                           | the claimer, the mandate's owner, or an admin | The outcome is unknown (e.g. a timeout — did it execute or not?).                                                                                                                                                 |
| `POST .../effect/reconcile`                         | the claimer, the mandate's owner, or an admin | Resolve an unknown effect once more information is available.                                                                                                                                                     |
| `POST .../effect/force-reconcile`                   | the mandate's owner, or an admin              | Take a claimed hold out of the claimer's hands and into reconciliation (e.g. after revoking that counterparty).                                                                                                   |
| `POST .../effect/resolve`                           | platform admin                                | Human-ops resolution, for effects that can't self-resolve.                                                                                                                                                        |
| `POST .../effect/compensate/begin` · `.../complete` | platform admin                                | A compensating transaction, for an effect that executed but needs to be reversed.                                                                                                                                 |
| `GET .../effect`                                    | anyone with the authorization id              | **Outcome lookup**: what became of this authorization, whether anything executed, and whether a fresh attempt is safe.                                                                                            |

Knowing the authorization id alone is not enough to mark an outcome unknown or ask for reconciliation — both freeze a hold, so they need the claimer's signature (or claim token), the owner, or an operator. The full lifecycle, including capture and void, is on [Holds, Claims & Exactly-Once Execution](https://docs.metamynd.ai/core-concepts/holds-claims-and-exactly-once-execution).

This matters because an authorised-but-unverified action is a different risk category from an authorised-and-confirmed one — and from an authorised-and-confirmed-not-to-have-happened one. Most governance systems stop tracking at "was it authorised." MAGP keeps tracking through "did it happen," because that's the question an auditor or a regulator actually asks after the fact.

#### Settlement evidence: what the settled amount rests on <a href="#user-content-settlement-evidence-what-the-settled-amount-rests-on" id="user-content-settlement-evidence-what-the-settled-amount-rests-on"></a>

A hold records the amount the gate **authorised** once, and it is never overwritten. When the hold settles, the **settled** amount is recorded separately, together with what that figure rests on:

| `settlementEvidence`       | Meaning                                                                                                                           |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `unattested`               | The full authorised amount, counted for a caller that isn't the claiming counterparty. It asserts nothing about what was charged. |
| `unclaimed_lowered`        | Settled below the authorisation before anyone claimed it — a release, since nothing can have executed.                            |
| `counterparty_attested`    | The claiming counterparty reported the amount. Believed because of who said it; nothing confirmed it.                             |
| `independently_confirmed`  | An independent observer of the remote system confirmed this amount.                                                               |
| `operator_resolved`        | A platform operator decided the amount while resolving an ambiguous effect.                                                       |
| `reconciled_at_authorized` | The remote system confirmed the effect occurred but reported no amount, so the full authorised amount is counted.                 |

A settled amount can never exceed the authorised amount; an effect that turns out to have settled for more goes to compensation for a person to decide (`SETTLED_OVER_AUTHORIZED`). For x402-bound holds, a counterparty that reports a *lower* settlement must be backed by an independent observer — the Hedera mirror node, given the transaction id and the account paid (`payTo`) — or the lower figure is refused. An owner can also require that a lowered settlement for a given merchant names one of that merchant's registered accounts (the payee directory). See [Settlement & Settlement Evidence](https://docs.metamynd.ai/agent-protocol/settlement-and-settlement-evidence) and [Trusted Counterparties & Payee Directory](https://docs.metamynd.ai/core-concepts/trusted-counterparties-and-payee-directory).

#### Signed artifacts a relying party can check <a href="#user-content-signed-artifacts-a-relying-party-can-check" id="user-content-signed-artifacts-a-relying-party-can-check"></a>

Merkle-anchored evidence answers "did this decision exist, unmodified?". Two further signed artifacts answer narrower questions without needing a Merkle path at all:

* **Action Passport** — issued for each authorization decision and signed by MetaMynd. A counterparty can check it is intact and still active; it is refused once expired, consumed or revoked (`PASSPORT_EXPIRED`, `PASSPORT_ALREADY_CONSUMED`, `PASSPORT_REVOKED`). Public verify page: `/verify/action-passport/{authorizationId}`.
* **Execution Receipt** — issued when a value-bearing action is captured. It binds what was settled back to the Action Passport, and version 2 receipts also sign the `settlementEvidence` above. Anyone can verify it with `GET /action-passport/receipt/verify/{authorizationId}` and the published key at `GET /action-passport/pubkey`.

See [Passports, Receipts & Credential Vault](https://docs.metamynd.ai/core-concepts/passports-receipts-and-credential-vault).

#### Evidence exports <a href="#user-content-evidence-exports" id="user-content-evidence-exports"></a>

For an auditor, a regulator or your own compliance team, the evidence can be taken out in several forms:

* **Decision Explorer** (dashboard **Reporting → Decision Explorer**) — every decision your agents received, with authorisation, approval, execution, settlement and evidence shown as separate stages, filterable by period, agent, verdict, source and reason code. A decision's detail links its HCS topic and transaction to HashScan and offers its audit record (above). **Export CSV** downloads the filtered list, up to 5,000 rows. See [Reporting & the Decision Explorer](https://docs.metamynd.ai/guides/reporting-and-the-decision-explorer).
* **Evidence pack** (`GET /evidence/pack`) — a regulator-ready pack of your evidence, as JSON or printable HTML.
* **Compliance Evidence Artifact** (`GET /evidence/artifact`) — a self-contained, offline-verifiable artifact for one agent, covering the Standards in force and your own SOPs (never another tenant's). The same artifact can be exported in SAFR audit format (`?format=safr`) or mapped onto the UK AI Risk Management Toolkit's risk categories (`?format=uk-ai-risk-toolkit`).
* **Signer-daemon log anchoring** — agents that sign through the local signer daemon can anchor checkpoints of its hash-chained signing log on HCS, so the local log itself becomes tamper-evident.

Records are stored in UTC. The dashboard's reporting pages and Audit Log show times, and group days, in your account's reporting timezone (set in Settings), or in your browser's when none is set.

These exports describe how your controls behaved; they are evidence for your own compliance work, not a certification by MetaMynd.

#### The administrative Audit Log: a separate record <a href="#user-content-the-administrative-audit-log-a-separate-record" id="user-content-the-administrative-audit-log-a-separate-record"></a>

The evidence ledger records what the **gate** decided about an agent's action. It does not record what **people** changed. That is the job of the **Audit Log** (dashboard **Reporting → Audit Log**, `GET /audit-log`): who changed which role, setting, mandate, rule, agent state, credential, incident or review, when, and whether it went through.

* **Refused attempts are recorded too.** Each entry has an outcome: `success`, `denied` (the caller was not allowed), `rejected` (the request was refused as invalid) or `failed` (a server error).
* **Append-only and hash-chained.** The database refuses to update or delete an entry, and each entry carries a SHA-256 hash over the previous entry's hash and its own content, so an entry altered or removed from the middle breaks the chain. The chain head is anchored on Hedera (topic `audit-log`). Platform admins can run **Verify chain** (`GET /audit-log/verify`), which also compares the chain with its latest anchor.
* **No secrets.** Entries record the names of the request's fields, and values only for a fixed set of non-secret governance fields; never passwords, keys, tokens or setting values.
* **What it doesn't cover.** Agent gate traffic (authorize, capture, gateway reports) is not in the Audit Log; it is in the evidence ledger. Exports themselves (evidence pack, compliance artefact, the Decision Explorer and Audit Log CSVs) are audited.
* **Export CSV** downloads the filtered log, up to 10,000 rows.

The two differ in what they can prove. Evidence is Merkle-batched and anchored on Hedera, so anyone can check a decision without MetaMynd's database. The Audit Log is anchored differently: its hash chain detects an edited or removed entry in the middle, and its chain head is anchored on Hedera every 10 minutes when new entries were written, so entries removed from the end, or a rewritten chain, no longer match the anchor. There is no per-entry proof, and entries written after the latest anchor are covered only once the next anchor lands. See [Administrative Audit Log](https://docs.metamynd.ai/core-concepts/administrative-audit-log).

#### What this feeds <a href="#user-content-what-this-feeds" id="user-content-what-this-feeds"></a>

The refusal digest (`GET /policy/decisions/refusals`) turns this into something an owner can actually read: "what did my agents try to do that I refused, and how often" — without requiring anyone to query raw evidence records by hand. The same digest can be sent by email (`POST /policy/decisions/refusals/send`).

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.metamynd.ai/core-concepts/evidence-and-audit.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
